Do not suppress the fn item uniqueness note for late bound lifetimes - #161894
Do not suppress the fn item uniqueness note for late bound lifetimes#161894zakrad wants to merge 2 commits into
Conversation
|
r? @nnethercote rustbot has assigned @nnethercote. Use Why was this reviewer chosen?The reviewer was selected based on:
|
There was a problem hiding this comment.
Suggestion for next time: when doing error message improvements it's nice to add the new test in a first commit, and then make the error message change in the second commit. That way it's easy for the reviewer to see exactly how the error message changed.
| || !found_sig.is_suggestable(self.tcx, true) | ||
| || !expected_sig.is_suggestable(self.tcx, true) | ||
| || self.tcx.intrinsic(*did1).is_some() | ||
| || self.tcx.intrinsic(*did2).is_some() |
There was a problem hiding this comment.
Should this condition be updated to use expected_sig_anon and found_sign_anon?
There was a problem hiding this comment.
I tried, it makes the as fn(..) help trigger and then prints as fn(&'^0.Named(DefId(0:6 ~ lt[99a7]::f1::'a)) A) which looks like a separate pre existing issue with that help, so I left it as is.
|
This seems reasonable to me, modulo the mentioned nit. But anything involving r? types |
e378b8a to
21228c2
Compare
|
Splitted as suggested @rustbot ready |
Fixes #145558
same_type_modulo_infercompared the bound regions by identity, so the note was suppressed for late bound lifetimes and anonymizing the binders fixes it.I authored and reviewed the change and used LLM to help locate the code and validate the fix