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] "so that ... will meet its required lifetime bounds" should point to RPIT, not statement #97252

Open
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) 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

In src/test/ui/impl-trait/type_parameters_captured.rs (and similarly in src/test/ui/impl-trait/must_outlive_least_region_or_bound.rs) the suggestion goes from

error[E0310]: the parameter type `T` may not live long enough
  --> $DIR/type_parameters_captured.rs:11:20
   |
LL | fn foo<T>(x: T) -> impl Any + 'static {
   |                    ^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
   |
help: consider adding an explicit lifetime bound...

to

error[E0310]: the parameter type `T` may not live long enough
  --> $DIR/type_parameters_captured.rs:13:5
   |
LL |     x
   |     ^ ...so that the type `T` will meet its required lifetime bounds
   |
help: consider adding an explicit lifetime bound...
@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.
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) 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

1 participant