rust/tests/ui/rfcs/rfc-2093-infer-outlives/regions-enum-not-wf.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1.6 KiB
Plaintext
Raw Normal View History

error[E0309]: the parameter type `T` may not live long enough
--> $DIR/regions-enum-not-wf.rs:17:18
|
2023-09-17 09:32:02 -05:00
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
2022-03-14 09:56:37 -05:00
|
2023-10-08 05:06:17 -05:00
help: consider adding an explicit lifetime bound
2022-03-14 09:56:37 -05:00
|
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
|
2023-09-17 09:32:02 -05:00
LL | enum Ref2<'a, T> {
| -- the parameter type `T` must be valid for the lifetime `'a` as defined here...
LL | Ref2Variant1,
2019-03-09 06:03:44 -06:00
LL | Ref2Variant2(isize, RequireOutlives<'a, T>),
| ^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
2022-03-14 09:56:37 -05:00
|
2023-10-08 05:06:17 -05:00
help: consider adding an explicit lifetime bound
2022-03-14 09:56:37 -05:00
|
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
|
2023-09-17 09:32:02 -05:00
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
2022-03-14 09:56:37 -05:00
|
2023-10-08 05:06:17 -05:00
help: consider adding an explicit lifetime bound
2022-03-14 09:56:37 -05:00
|
LL | enum RefDouble<'a, 'b, T: 'b> {
| ++++
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0309`.