Showcase a broken diagnostic
This commit is contained in:
parent
86f1ca812b
commit
5ace12c409
2 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue