summaryrefslogtreecommitdiffstats
path: root/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr')
-rw-r--r--tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr
index bb455e9ae..cef4a0f1e 100644
--- a/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr
+++ b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr
@@ -24,10 +24,13 @@ LL | fn no_region<'a, T>(a: Cell<&'a ()>, b: T) {
error[E0309]: the parameter type `T` may not live long enough
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:32:9
|
+LL | fn no_region<'a, T>(a: Cell<&'a ()>, b: T) {
+ | -- the parameter type `T` must be valid for the lifetime `'a` as defined here...
+...
LL | require(&x, &y)
| ^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
-help: consider adding an explicit lifetime bound...
+help: consider adding an explicit lifetime bound
|
LL | fn no_region<'a, T: 'a>(a: Cell<&'a ()>, b: T) {
| ++++
@@ -84,10 +87,13 @@ LL | | T: 'b,
error[E0309]: the parameter type `T` may not live long enough
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:65:9
|
+LL | fn wrong_region<'a, 'b, T>(a: Cell<&'a ()>, b: T)
+ | -- the parameter type `T` must be valid for the lifetime `'a` as defined here...
+...
LL | require(&x, &y)
| ^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
-help: consider adding an explicit lifetime bound...
+help: consider adding an explicit lifetime bound
|
LL | T: 'b + 'a,
| ++++