When passing too many lifetimes to a struct, there are tons of unrelated errors about needing explicit lifetime annotations #125604
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-verbose
Diagnostics: Too much output caused by a single piece of incorrect code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
To reproduce, check out commit cdc509f of rustc and then edit this line:
rust/src/tools/miri/src/borrow_tracker/stacked_borrows/mod.rs
Line 278 in d50c2b0
Specifically, add another
'_,
before the'tcx
. Then run./x.py check miri
. This results in some surprising errors:The first error is what I expected, but the other two are not useful: they are referring to an argument type that's not even a valid type, so they should not be shown. When doing refactoring, it can be quite hard to spot the actual errors in this sea of false errors.
So far I have not managed to reproduce this with a smaller example.
Cc @oli-obk is this a consequence of your recent work to keep compiling in more cases?
The text was updated successfully, but these errors were encountered: