-
Notifications
You must be signed in to change notification settings - Fork 561
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
Delayed numeric literal resolution allowing catch all integer Drop Copy. #7161
base: main
Are you sure you want to change the base?
Conversation
6d915ab
to
b3a172f
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 2 of 15 files at r1, all commit messages.
Reviewable status: 2 of 15 files reviewed, 2 unresolved discussions (waiting on @orizi and @TomerStarkware)
tests/bug_samples/issue7155.cairo
line 3 at r1 (raw file):
#[test] fn test_enumerate_type_resolution() { for (k, v) in array![0, 1, 2_usize].into_iter().enumerate() {
Suggestion:
or (k, v) in array![0, 1, 2]
crates/cairo-lang-plugins/src/test_data/config
line 304 at r1 (raw file):
//! > expanded_cairo_code #[cfg(and(a, b))]
What cause this?
Code quote:
//! > expanded_cairo_code
#[cfg(and(a, b))]
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: 2 of 15 files reviewed, 3 unresolved discussions (waiting on @orizi and @TomerStarkware)
corelib/src/integer.cairo
line 83 at r1 (raw file):
// Attached traits for all numeric literals. impl Copy: Copy<Self::Type>; impl Drop: Drop<Self::Type>;
Where are the new impls used?
Code quote:
impl Copy: Copy<Self::Type>;
impl Drop: Drop<Self::Type>;
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: 2 of 15 files reviewed, 3 unresolved discussions (waiting on @gilbens-starkware and @TomerStarkware)
corelib/src/integer.cairo
line 83 at r1 (raw file):
Previously, gilbens-starkware (Gil Ben-Shachar) wrote…
Where are the new impls used?
automatically in everyplace you have a numeric literal.
if you have 1
- it will be Copy and Drop even before we realize it is a felt252 specifically.
crates/cairo-lang-plugins/src/test_data/config
line 304 at r1 (raw file):
Previously, gilbens-starkware (Gil Ben-Shachar) wrote…
What cause this?
unclear - reverted.
tests/bug_samples/issue7155.cairo
line 3 at r1 (raw file):
#[test] fn test_enumerate_type_resolution() { for (k, v) in array![0, 1, 2_usize].into_iter().enumerate() {
good catch - this didn't actually solve this apparently.
feel free to stop checking this for now.
b3a172f
to
7888db9
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 11 of 15 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @gilbens-starkware)
No description provided.