summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfcs/rfc-2093-infer-outlives
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/rfcs/rfc-2093-infer-outlives')
-rw-r--r--tests/ui/rfcs/rfc-2093-infer-outlives/dont-infer-static.stderr7
-rw-r--r--tests/ui/rfcs/rfc-2093-infer-outlives/regions-enum-not-wf.stderr13
-rw-r--r--tests/ui/rfcs/rfc-2093-infer-outlives/regions-struct-not-wf.stderr8
3 files changed, 21 insertions, 7 deletions
diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/dont-infer-static.stderr b/tests/ui/rfcs/rfc-2093-infer-outlives/dont-infer-static.stderr
index 0c388f5fe..041f7ebc0 100644
--- a/tests/ui/rfcs/rfc-2093-infer-outlives/dont-infer-static.stderr
+++ b/tests/ui/rfcs/rfc-2093-infer-outlives/dont-infer-static.stderr
@@ -2,14 +2,17 @@ error[E0310]: the parameter type `U` may not live long enough
--> $DIR/dont-infer-static.rs:6:10
|
LL | bar: Bar<U>
- | ^^^^^^ ...so that the type `U` will meet its required lifetime bounds...
+ | ^^^^^^
+ | |
+ | the parameter type `U` must be valid for the static lifetime...
+ | ...so that the type `U` will meet its required lifetime bounds...
|
note: ...that is required by this bound
--> $DIR/dont-infer-static.rs:8:15
|
LL | struct Bar<T: 'static> {
| ^^^^^^^
-help: consider adding an explicit lifetime bound...
+help: consider adding an explicit lifetime bound
|
LL | struct Foo<U: 'static> {
| +++++++++
diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/regions-enum-not-wf.stderr b/tests/ui/rfcs/rfc-2093-infer-outlives/regions-enum-not-wf.stderr
index 2c660b285..5b605f3ee 100644
--- a/tests/ui/rfcs/rfc-2093-infer-outlives/regions-enum-not-wf.stderr
+++ b/tests/ui/rfcs/rfc-2093-infer-outlives/regions-enum-not-wf.stderr
@@ -1,10 +1,12 @@
error[E0309]: the parameter type `T` may not live long enough
--> $DIR/regions-enum-not-wf.rs:17:18
|
+LL | enum Ref1<'a, T> {
+ | -- the parameter type `T` must be valid for the lifetime `'a` as defined here...
LL | Ref1Variant1(RequireOutlives<'a, T>),
| ^^^^^^^^^^^^^^^^^^^^^^ ...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 | enum Ref1<'a, T: 'a> {
| ++++
@@ -12,10 +14,13 @@ LL | enum Ref1<'a, T: 'a> {
error[E0309]: the parameter type `T` may not live long enough
--> $DIR/regions-enum-not-wf.rs:22:25
|
+LL | enum Ref2<'a, T> {
+ | -- the parameter type `T` must be valid for the lifetime `'a` as defined here...
+LL | Ref2Variant1,
LL | Ref2Variant2(isize, RequireOutlives<'a, T>),
| ^^^^^^^^^^^^^^^^^^^^^^ ...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 | enum Ref2<'a, T: 'a> {
| ++++
@@ -23,10 +28,12 @@ LL | enum Ref2<'a, T: 'a> {
error[E0309]: the parameter type `T` may not live long enough
--> $DIR/regions-enum-not-wf.rs:35:23
|
+LL | enum RefDouble<'a, 'b, T> {
+ | -- the parameter type `T` must be valid for the lifetime `'b` as defined here...
LL | RefDoubleVariant1(&'a RequireOutlives<'b, T>),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ ...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 | enum RefDouble<'a, 'b, T: 'b> {
| ++++
diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/regions-struct-not-wf.stderr b/tests/ui/rfcs/rfc-2093-infer-outlives/regions-struct-not-wf.stderr
index 34ff1362c..eb17ce736 100644
--- a/tests/ui/rfcs/rfc-2093-infer-outlives/regions-struct-not-wf.stderr
+++ b/tests/ui/rfcs/rfc-2093-infer-outlives/regions-struct-not-wf.stderr
@@ -1,10 +1,12 @@
error[E0309]: the parameter type `T` may not live long enough
--> $DIR/regions-struct-not-wf.rs:13:16
|
+LL | impl<'a, T> Trait<'a, T> for usize {
+ | -- the parameter type `T` must be valid for the lifetime `'a` as defined here...
LL | type Out = &'a T;
| ^^^^^ ...so that the reference type `&'a T` does not outlive the data it points at
|
-help: consider adding an explicit lifetime bound...
+help: consider adding an explicit lifetime bound
|
LL | impl<'a, T: 'a> Trait<'a, T> for usize {
| ++++
@@ -12,6 +14,8 @@ LL | impl<'a, T: 'a> Trait<'a, T> for usize {
error[E0309]: the parameter type `T` may not live long enough
--> $DIR/regions-struct-not-wf.rs:21:16
|
+LL | impl<'a, T> Trait<'a, T> for u32 {
+ | -- the parameter type `T` must be valid for the lifetime `'a` as defined here...
LL | type Out = RefOk<'a, T>;
| ^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds...
|
@@ -20,7 +24,7 @@ note: ...that is required by this bound
|
LL | struct RefOk<'a, T:'a> {
| ^^
-help: consider adding an explicit lifetime bound...
+help: consider adding an explicit lifetime bound
|
LL | impl<'a, T: 'a> Trait<'a, T> for u32 {
| ++++