Skip to content

Commit 5ace12c

Browse files
committed
Showcase a broken diagnostic
1 parent 86f1ca8 commit 5ace12c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/test/ui/impl-trait/unactionable_diagnostic.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ struct Foo;
44

55
impl Trait for Foo {}
66

7-
fn foo<'t, P>(
7+
fn foo<'x, P>(
88
post: P,
9-
x: &'t Foo,
10-
) -> &'t impl Trait {
9+
x: &'x Foo,
10+
) -> &'x impl Trait {
1111
//~^ HELP: consider adding an explicit lifetime bound...
1212
x
1313
}

src/test/ui/impl-trait/unactionable_diagnostic.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | foo(post, x)
66
|
77
help: consider adding an explicit lifetime bound...
88
|
9-
LL | ) -> &'t impl Trait + 't {
9+
LL | ) -> &'x impl Trait + 't {
1010
| ++++
1111

1212
error: aborting due to previous error

0 commit comments

Comments
 (0)