Skip to content
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

[NLL] "that is required by this bound" note missing #97253

Open
jackh726 opened this issue May 21, 2022 · 0 comments
Open

[NLL] "that is required by this bound" note missing #97253

jackh726 opened this issue May 21, 2022 · 0 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-NLL Area: Non-lexical lifetimes (NLL) D-terse Diagnostics: An error or lint that doesn't give enough information about the problem at hand. NLL-diagnostics Working towards the "diagnostic parity" goal T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@jackh726
Copy link
Member

jackh726 commented May 21, 2022

In src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.rs and src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.rs we lose a note:

before

error[E0309]: the associated type `<T as MyTrait<'a>>::Output` may not live long enough
  --> $DIR/projection-where-clause-env-wrong-lifetime.rs:14:5
   |
LL |     bar::<<T as MyTrait<'a>>::Output>()
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider adding an explicit lifetime bound `<T as MyTrait<'a>>::Output: 'a`...
   = note: ...so that the type `<T as MyTrait<'a>>::Output` will meet its required lifetime bounds...
note: ...that is required by this bound
  --> $DIR/projection-where-clause-env-wrong-lifetime.rs:20:8
   |
LL |     T: 'a,
   |        ^^

after

error[E0309]: the associated type `<T as MyTrait<'_>>::Output` may not live long enough
  --> $DIR/projection-where-clause-env-wrong-lifetime.rs:14:5
   |
LL |     bar::<<T as MyTrait<'a>>::Output>()
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider adding an explicit lifetime bound `<T as MyTrait<'_>>::Output: 'a`...
   = note: ...so that the type `<T as MyTrait<'_>>::Output` will meet its required lifetime bounds

Probably related, but the error used '_ instead of 'a

@jackh726 jackh726 added A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-NLL Area: Non-lexical lifetimes (NLL) NLL-diagnostics Working towards the "diagnostic parity" goal labels May 21, 2022
bors added a commit to rust-lang-ci/rust that referenced this issue May 22, 2022
Move remaining tests with NLL differences to revisions

Based on rust-lang#97206

I've already filed issues for any important differences that I've spotted: rust-lang#97252 rust-lang#97253 rust-lang#97256 rust-lang#97267

There is a lot here, but each commit is self-contained as a separate directory. I can split into separate PRs as wanted or needed.
@inquisitivecrystal inquisitivecrystal added the D-terse Diagnostics: An error or lint that doesn't give enough information about the problem at hand. label May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-NLL Area: Non-lexical lifetimes (NLL) D-terse Diagnostics: An error or lint that doesn't give enough information about the problem at hand. NLL-diagnostics Working towards the "diagnostic parity" goal T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants