-
Notifications
You must be signed in to change notification settings - Fork 596
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 phantom
attribute.
#5381
Add phantom
attribute.
#5381
Conversation
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 2 of 6 files at r1.
Reviewable status: 2 of 6 files reviewed, 2 unresolved discussions (waiting on @ilyalesokhin-starkware)
crates/cairo-lang-semantic/src/expr/compute.rs
line 805 at r1 (raw file):
CannotCreateInstancesOfPhantomTypes, ); }
.
Suggestion:
if let Some(attr) = concrete_enum_id.find_attr(db, PHANTOM_ATTR)? {
ctx.diagnostics.report(
syntax,
CannotCreateInstancesOfPhantomTypes,
);
}
crates/cairo-lang-semantic/src/expr/compute.rs
line 1927 at r1 (raw file):
ctx.diagnostics .report_by_ptr(attr.id_stable_ptr.untyped(), CannotCreateInstancesOfPhantomTypes); }
the error should appear at the usage - not the attr.
Suggestion:
if let Some(attr) = concrete_struct_id.find_attr(db, PHANTOM_ATTR)? {
ctx.diagnostics
.report(ctor_syntax, CannotCreateInstancesOfPhantomTypes);
}
9cc3fc4
to
38439f7
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: 1 of 6 files reviewed, 2 unresolved discussions (waiting on @orizi)
crates/cairo-lang-semantic/src/expr/compute.rs
line 805 at r1 (raw file):
Previously, orizi wrote…
.
Done.
crates/cairo-lang-semantic/src/expr/compute.rs
line 1927 at r1 (raw file):
Previously, orizi wrote…
the error should appear at the usage - not the attr.
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 3 of 6 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @ilyalesokhin-starkware)
38439f7
to
4487f10
Compare
This change is