-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Test Case for Incr. Comp. Hash for traits #36681. #36940
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
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Thank you so much for the PR, @eulerdisk
|
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.
Excellent work, thank you so much for putting in the time, @eulerdisk!
I've left some comments on things that need to be corrected. When that is done, this is good to merge.
#[cfg(not(cfail1))] | ||
#[rustc_dirty(label="Hir", cfg="cfail2")] | ||
#[rustc_clean(label="Hir", cfg="cfail3")] | ||
#[rustc_metadata_clean(cfg="cfail3")] |
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.
Can you add #[rustc_metadata_dirty(cfg="cfail2")]
here?
// Change order of method parameters ---------------------------------------------- | ||
#[cfg(cfail1)] | ||
trait TraitChangeMethodParametersOrder { | ||
fn method(a: i32, b: i32); |
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.
Can you change the type of b
to something different than the type of a
(e.g. i64
)?
|
||
// dummy trait for bound | ||
trait ReferenceTrait0 { } | ||
trait ReferenceTrait1 { } |
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.
ReferencedTraitX
would be more appropriate than ReferenceTraitX
.
// Add second lifetime bound to method type parameter ----------------------------- | ||
#[cfg(cfail1)] | ||
trait TraitAddSecondLifetimeBoundToMethodTypeParameter { | ||
fn method<'a, 'b, 'c>(a: &'a u32, b: &'b u32); |
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.
Can you add the c
parameter to the cfail1
version too and add a bound to 'c
, e.g. 'c : 'a
. We really want to test whether just adding another bound to 'c
changes the hash. Like it is written now, we don't know if the hash just changed because another parameter has been added.
@eulerdisk FYI, I just saw that that last commit fixes the missing lifetime bound in the |
Thanks, @eulerdisk, I think now we've got everything |
@bors r+ |
📌 Commit bd77b39 has been approved by |
…oerister Test Case for Incr. Comp. Hash for traits #36681. Fixes #36681 Part of #36350 Currently, the following tests fail: Unsafe modifier Extern modifier Extern c to rust-intrinsic Trait unsafety Change type of method parameter (&i32 => &mut i32) Mode of self parameter r? @michaelwoerister
Fixes #36681
Part of #36350
Currently, the following tests fail:
Unsafe modifier
Extern modifier
Extern c to rust-intrinsic
Trait unsafety
Change type of method parameter (&i32 => &mut i32)
Mode of self parameter
r? @michaelwoerister