Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add signature for struct's member #1601

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 0 additions & 86 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions extensions/scarb-doc/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ impl Struct {
) -> Self {
let members = db.struct_members(id).unwrap();

let item_data = ItemData::new_without_signature(
let item_data = ItemData::new(
db,
id,
LookupItemId::ModuleItem(ModuleItemId::Struct(id)).into(),
Expand Down Expand Up @@ -360,7 +360,7 @@ impl Member {
let item_data = ItemData {
name,
doc: get_item_documentation(db, &stable_location),
signature: None,
signature: Some(db.get_item_signature(DocumentableItemId::Member(id))),
full_path,
};

Expand All @@ -387,7 +387,7 @@ pub struct Enum {
impl Enum {
pub fn new(db: &ScarbDocDatabase, id: EnumId) -> Self {
let variants = db.enum_variants(id).unwrap();
let item_data = ItemData::new_without_signature(
let item_data = ItemData::new(
db,
id,
LookupItemId::ModuleItem(ModuleItemId::Enum(id)).into(),
Expand Down Expand Up @@ -430,7 +430,7 @@ impl Variant {
let item_data = ItemData {
name,
doc: get_item_documentation(db, &stable_location),
signature: None,
signature: Some(db.get_item_signature(DocumentableItemId::Variant(id))),
full_path,
};

Expand Down
Loading