-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Try to use approximate placeholder regions when outputting an AscribeUserType error in borrowck #116097
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
Try to use approximate placeholder regions when outputting an AscribeUserType error in borrowck #116097
Conversation
r? @wesleywiser (rustbot has picked a reviewer for you, use r? to override) |
= note: expected reference `&String` | ||
found reference `&String` |
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.
I'm not sure if I consider this an improvement over "higher ranked lifetime error".
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.
Yeah, the note is not all that helpful. But its actually very similar to our pre-NLL error (see output on 1.64).
I consider this more of a "get us back to where we were" than a "this is the best we can do"
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.
The "one type is more general than the other" note is the most helpful part of the diagnostic, and I think that's an improvement over "higher-ranked lifetime error" alone.
= note: expected trait `Send` | ||
found trait `for<'a> Send` |
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.
Why do we end up reporting this?
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.
I'm not sure :) seems like something with our lowering isn't quite right. I've seen something similar before, I think.
…UserType error in borrowck
4be5645
to
35dd0c9
Compare
@rustbot ready |
Would you mind taking another look at this? I'm not sure if your initial feedback has all been resolved as you expect or not. |
@bors r+ I still don't think I agree that this PR is better but whatever |
☀️ Test successful - checks-actions |
Finished benchmarking commit (820f06b): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 674.025s -> 675.791s (0.26%) |
Fixes #114866
Hi from GOSIM :)