Skip to content

Remove FIXME about NLL diagnostic that is already improved #114558

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

Merged
merged 1 commit into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion tests/ui/nll/guarantor-issue-46974.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
3 changes: 1 addition & 2 deletions tests/ui/nll/guarantor-issue-46974.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down