-
Notifications
You must be signed in to change notification settings - Fork 581
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
Support feature
at module and fn level.
#4941
Conversation
67d52bb
to
bf45849
Compare
bf45849
to
e8c431d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 7 of 8 files at r1, all commit messages.
Reviewable status: 7 of 8 files reviewed, 2 unresolved discussions (waiting on @orizi)
crates/cairo-lang-semantic/src/expr/compute.rs
line 268 at r1 (raw file):
diagnostics, ), };
Consider implementing QueryAttrs
for LookupItemId
and then just extract_allowed_features
it.
Code quote:
let allowed_features = match lookup_item_id {
LookupItemId::ModuleItem(id) => extract_allowed_features(
semantic_db,
&id.stable_location(defs_db).syntax_node(defs_db),
diagnostics,
),
LookupItemId::TraitItem(id) => extract_allowed_features(
semantic_db,
&id.stable_location(defs_db).syntax_node(defs_db),
diagnostics,
),
LookupItemId::ImplItem(id) => extract_allowed_features(
semantic_db,
&id.stable_location(defs_db).syntax_node(defs_db),
diagnostics,
),
};
crates/cairo-lang-semantic/src/expr/compute.rs
line 2507 at r1 (raw file):
} /// Returns the allowed features of a query
Suggestion:
an object which supports attributes.
commit-id:22ee9464
e8c431d
to
0dda952
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 7 of 8 files reviewed, 2 unresolved discussions (waiting on @gilbens-starkware)
crates/cairo-lang-semantic/src/expr/compute.rs
line 268 at r1 (raw file):
Previously, gilbens-starkware (Gil Ben-Shachar) wrote…
Consider implementing
QueryAttrs
forLookupItemId
and then justextract_allowed_features
it.
can't - trait is defined on syntax, and ids are defined on defs.
crates/cairo-lang-semantic/src/expr/compute.rs
line 2507 at r1 (raw file):
} /// Returns the allowed features of a query
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @orizi)
Stack:
feature
at module and fn level. #4941 ⬅This change is