-
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
Improve case with one named, one anonymous lifetime parameter - SubSupConflict Errors #42701
Comments
I'd like to start working on this if noone else is assigned. |
@cengizio expressed some interest in taking a look at this. @cengizio, here are some rough instructions for what would have to be done. Currently, when reporting region errors, we check for the special case of a "named-anon conflict". If you look into this function, you'll see that it first tests for |
You can read up my blogs here. I hope they will be of help :) |
Ping: I was busy with other stuff since I've signed up to this. Now that they are over, I'm diving into it. |
I think this is a good test case: struct Foo {
field: i32,
}
fn foo2<'a>(a: &'a Foo, x: &i32) -> &'a i32 {
if true {
let p: &i32 = &a.field;
&*p
} else {
&*x
}
}
fn main() { } |
Hello @gaurikholkar I was in LOA during last week, just returned. Will revise my PR tomorrow. |
I've removed the redundant test case and updated the sample input with the provided one up in #42701 (comment) |
Improve SubSupConflict with a named and an anonymous lifetime parameter #42701 Hello! This fixes #42701. ## UPDATE 01 Tests are producing different results between different env builds. This inconsistency might take a long time to investigate and fix. So, be patient ## UPDATE 02 Changed an `FxHashMap` with a `BTreeMap`. Inconsistency seems to be resolved for now.
Improve SubSupConflict with a named and an anonymous lifetime parameter #42701 Hello! This fixes #42701. ## UPDATE 01 Tests are producing different results between different env builds. This inconsistency might take a long time to investigate and fix. So, be patient ## UPDATE 02 Changed an `FxHashMap` with a `BTreeMap`. Inconsistency seems to be resolved for now.
Currently in #42669, we are handling only ConcreteFailure RegionResolution Errors. We need to detect and improve the error message for SubSupConflict Error as well.
cc @nikomatsakis
The text was updated successfully, but these errors were encountered: