diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-08-07 00:06:08 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-07 00:06:08 +0200 |
| commit | f44f0279fa46ca1b4e71c9b15791377fda93c655 (patch) | |
| tree | fd750426fdb9a3e4e9ee22a6e14bab65bcd9ea43 | |
| parent | 44479d1b35d2a518b7336230b214300cb781331b (diff) | |
| parent | 8a7520995ce4111559fee04f28985454cb753496 (diff) | |
| download | rust-f44f0279fa46ca1b4e71c9b15791377fda93c655.tar.gz rust-f44f0279fa46ca1b4e71c9b15791377fda93c655.zip | |
Rollup merge of #114558 - Enselic:lifetime-diagnostic-fixed, r=cjgillot
Remove FIXME about NLL diagnostic that is already improved
The FIXME was added in #46984 when the diagnostic message looked like this:
// FIXME(#46983): error message should be better
&s.0 //~ ERROR free region `` does not outlive free region `'static`
The message was improved in #90667 and now looks like this:
&s.0 //~ ERROR lifetime may not live long enough
but the FIXME was not removed. The issue #46983 about that diagnostics should be improved has been closed. We can remove the FIXME now.
(This PR was made for #44366.)
| -rw-r--r-- | tests/ui/nll/guarantor-issue-46974.rs | 1 | ||||
| -rw-r--r-- | tests/ui/nll/guarantor-issue-46974.stderr | 3 |
2 files changed, 1 insertions, 3 deletions
diff --git a/tests/ui/nll/guarantor-issue-46974.rs b/tests/ui/nll/guarantor-issue-46974.rs index 96af4bf5c36..93fdf7b460b 100644 --- a/tests/ui/nll/guarantor-issue-46974.rs +++ b/tests/ui/nll/guarantor-issue-46974.rs @@ -9,7 +9,6 @@ fn foo(s: &mut (i32,)) -> i32 { } fn bar(s: &Box<(i32,)>) -> &'static i32 { - // FIXME(#46983): error message should be better &s.0 //~ ERROR lifetime may not live long enough } diff --git a/tests/ui/nll/guarantor-issue-46974.stderr b/tests/ui/nll/guarantor-issue-46974.stderr index 7edc3dcc5cd..f09faf1630b 100644 --- a/tests/ui/nll/guarantor-issue-46974.stderr +++ b/tests/ui/nll/guarantor-issue-46974.stderr @@ -10,11 +10,10 @@ LL | *x | -- borrow later used here error: lifetime may not live long enough - --> $DIR/guarantor-issue-46974.rs:13:5 + --> $DIR/guarantor-issue-46974.rs:12:5 | LL | fn bar(s: &Box<(i32,)>) -> &'static i32 { | - let's call the lifetime of this reference `'1` -LL | // FIXME(#46983): error message should be better LL | &s.0 | ^^^^ returning this value requires that `'1` must outlive `'static` |
