leak_check in rustc_const_eval::util::relate_types#155883
leak_check in rustc_const_eval::util::relate_types#155883lcnr wants to merge 1 commit intorust-lang:mainfrom
rustc_const_eval::util::relate_types#155883Conversation
|
|
This comment has been minimized.
This comment has been minimized.
| impl Trait for F1 { | ||
| type Assoc = i64; | ||
| } | ||
| #[expect(coherence_leak_check)] |
There was a problem hiding this comment.
What does this do...?
There was a problem hiding this comment.
it expects the coherence_leak_check lint. That lint is in a horrible state but fixing the lint doesn't seem too useful given that this thing is currently still in flux and updating it properly is non-trivial 😅
There was a problem hiding this comment.
Ah, your fix makes this code emit a lint (#56105). That doesn't seem to make much sense but 🤷 sure whatever.
There was a problem hiding this comment.
This is more of a const-eval interpreter problem than a transmute problem so IMO putting it in the "consts/const-eval" folder makes more sense. Or at least have "const" somewhere in the name so that it gets picked up by ./x test ui -- const.
de223eb to
715e75d
Compare
|
r=me based on the tests passing. Up to you if you want to get a review from someone who actually knows what all these type system queries do. ;) |
| ocx.evaluate_obligations_error_on_ambiguity().is_empty() | ||
|
|
||
| if ocx.evaluate_obligations_error_on_ambiguity().is_empty() { | ||
| infcx.leak_check(ty::UniverseIndex::ROOT, None).is_ok() |
There was a problem hiding this comment.
| infcx.leak_check(ty::UniverseIndex::ROOT, None).is_ok() | |
| // Ensure there are no pending lifetime constraints. This is needed to avoid issues like | |
| // <https://github.com/rust-lang/rust/issues/155477>. | |
| infcx.leak_check(ty::UniverseIndex::ROOT, None).is_ok() |
|
The job Click to see the possible cause of the failure (guessed by this bot) |
fixes #155477. we should really figure out an API where people don't have to manually call
leak_checkfor their code to be correct. I don't really know what that API should be for now, but the status quo sucks xxsame issue was recently fixed when checking that the return type of
fn mainimplementsTerminationin #151377r? BoxyUwU