summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.stderr')
-rw-r--r--tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.stderr25
1 files changed, 7 insertions, 18 deletions
diff --git a/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.stderr b/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.stderr
index 936d87f79..2677b7943 100644
--- a/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.stderr
+++ b/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.stderr
@@ -1,30 +1,19 @@
error[E0311]: the parameter type `T` may not live long enough
--> $DIR/missing-lifetimes-in-signature-2.rs:23:5
|
+LL | fn func<T: Test>(_dummy: &Foo, foo: &Foo, t: T) {
+ | --- the parameter type `T` must be valid for the anonymous lifetime defined here...
LL | / foo.bar(move |_| {
LL | |
LL | | t.test();
LL | | });
- | |______^
+ | |______^ ...so that the type `T` will meet its required lifetime bounds
|
-note: the parameter type `T` must be valid for the anonymous lifetime defined here...
- --> $DIR/missing-lifetimes-in-signature-2.rs:22:24
+help: consider adding an explicit lifetime bound
|
-LL | fn func<T: Test>(foo: &Foo, t: T) {
- | ^^^
-note: ...so that the type `T` will meet its required lifetime bounds
- --> $DIR/missing-lifetimes-in-signature-2.rs:23:5
- |
-LL | / foo.bar(move |_| {
-LL | |
-LL | | t.test();
-LL | | });
- | |______^
-help: consider adding an explicit lifetime bound...
- |
-LL | fn func<'a, T: Test + 'a>(foo: &'a Foo<'a>, t: T) {
- | +++ ++++ ++ ++++
+LL | fn func<'a, T: Test + 'a>(_dummy: &Foo, foo: &Foo<'a>, t: T) {
+ | +++ ++++ ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0311`.