-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Coherence test when a generic type param has a default value from an associated type #61535
Coherence test when a generic type param has a default value from an associated type #61535
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (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. |
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.
Looks good to me, but I'll let Niko take a look as well since I don't really know much about this feature
ping from triage @nikomatsakis @jonas-schievink any updates on this? |
type Owned = String; | ||
} | ||
|
||
impl PartialEq<MyString> for LibCow<MyString> { |
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.
This test doesn't really check what the default works out to be, right? Should we do that?
#![allow(dead_code)] | ||
#![feature(re_rebalance_coherence)] | ||
|
||
// run-pass |
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 we leave a comment elaborating what this test is trying to test?
e8ac568
to
ef7d1cd
Compare
…lue from an associated type
ef7d1cd
to
1948140
Compare
Hi @nikomatsakis! |
@bors r+ rollup |
@bors r+ |
@bors r=nikomatsakis rollup |
📌 Commit 1948140 has been approved by |
…-assiociated-type-re-rebalance-coherence, r=nikomatsakis Coherence test when a generic type param has a default value from an associated type A followup on rust-lang#61400. Before `re_rebalance_coherence`, this fails to compile (even though it should be accepted). `re_rebalance_coherence` had no direct test for this, and I wanted to (a) make sure it doesn't regress in the future and (b) get it on record that this is actually the intended behavior.
Rollup of 12 pull requests Successful merges: - #61535 (Coherence test when a generic type param has a default value from an associated type) - #62274 (rustc_mir: follow FalseUnwind's real_target edge in qualify_consts.) - #62431 (Add messages to `Option`'s and `Result`'s `must_use` annotation for `is_*`) - #62453 (in which we suggest anonymizing single-use lifetimes in paths ) - #62568 (Replace unsafe_destructor_blind_to_params with may_dangle) - #62578 (Add test for #49919) - #62595 (Document that the crate keyword refers to the project root) - #62599 (move mem::uninitialized deprecation back by 1 release, to 1.39) - #62605 (Emit dropped unemitted errors to aid in ICE debugging) - #62607 (Correctly break out of recovery loop) - #62608 (`async unsafe fn` tests) - #62623 (downgrade indirect_structural_match lint to allow) Failed merges: r? @ghost
A followup on #61400.
Before
re_rebalance_coherence
, this fails to compile (even though it should be accepted).re_rebalance_coherence
had no direct test for this, and I wanted to (a) make sure it doesn't regress in the future and (b) get it on record that this is actually the intended behavior.