Showcase a broken diagnostic

This commit is contained in:
Oli Scherer 2022-09-23 07:10:11 +00:00
parent 86f1ca812b
commit 5ace12c409
2 changed files with 4 additions and 4 deletions

View file

@ -4,10 +4,10 @@ struct Foo;
impl Trait for Foo {}
fn foo<'t, P>(
fn foo<'x, P>(
post: P,
x: &'t Foo,
) -> &'t impl Trait {
x: &'x Foo,
) -> &'x impl Trait {
//~^ HELP: consider adding an explicit lifetime bound...
x
}

View file

@ -6,7 +6,7 @@ LL | foo(post, x)
|
help: consider adding an explicit lifetime bound...
|
LL | ) -> &'t impl Trait + 't {
LL | ) -> &'x impl Trait + 't {
| ++++
error: aborting due to previous error