fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
2.3 KiB67 linesraw
1error[E0309]: the parameter type `T` may not live long enough
2  --> $DIR/regions-enum-not-wf.rs:18:18
3   |
4LL | enum Ref1<'a, T> {
5   |               - help: consider adding an explicit lifetime bound `T: 'a`...
6LL |     Ref1Variant1(RequireOutlives<'a, T>)
7   |                  ^^^^^^^^^^^^^^^^^^^^^^
8   |
9note: ...so that the type `T` will meet its required lifetime bounds
10  --> $DIR/regions-enum-not-wf.rs:18:18
11   |
12LL |     Ref1Variant1(RequireOutlives<'a, T>)
13   |                  ^^^^^^^^^^^^^^^^^^^^^^
14
15error[E0309]: the parameter type `T` may not live long enough
16  --> $DIR/regions-enum-not-wf.rs:23:25
17   |
18LL | enum Ref2<'a, T> {
19   |               - help: consider adding an explicit lifetime bound `T: 'a`...
20LL |     Ref2Variant1,
21LL |     Ref2Variant2(isize, RequireOutlives<'a, T>),
22   |                         ^^^^^^^^^^^^^^^^^^^^^^
23   |
24note: ...so that the type `T` will meet its required lifetime bounds
25  --> $DIR/regions-enum-not-wf.rs:23:25
26   |
27LL |     Ref2Variant2(isize, RequireOutlives<'a, T>),
28   |                         ^^^^^^^^^^^^^^^^^^^^^^
29
30error[E0309]: the parameter type `T` may not live long enough
31  --> $DIR/regions-enum-not-wf.rs:35:1
32   |
33LL |   enum RefDouble<'a, 'b, T> {
34   |   ^                      - help: consider adding an explicit lifetime bound `T: 'b`...
35   |  _|
36   | |
37LL | |     RefDoubleVariant1(&'a RequireOutlives<'b, T>)
38LL | |
39LL | | }
40   | |_^
41   |
42note: ...so that the type `T` will meet its required lifetime bounds
43  --> $DIR/regions-enum-not-wf.rs:35:1
44   |
45LL | / enum RefDouble<'a, 'b, T> {
46LL | |     RefDoubleVariant1(&'a RequireOutlives<'b, T>)
47LL | |
48LL | | }
49   | |_^
50
51error[E0309]: the parameter type `T` may not live long enough
52  --> $DIR/regions-enum-not-wf.rs:36:23
53   |
54LL | enum RefDouble<'a, 'b, T> {
55   |                        - help: consider adding an explicit lifetime bound `T: 'b`...
56LL |     RefDoubleVariant1(&'a RequireOutlives<'b, T>)
57   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
58   |
59note: ...so that the type `T` will meet its required lifetime bounds
60  --> $DIR/regions-enum-not-wf.rs:36:23
61   |
62LL |     RefDoubleVariant1(&'a RequireOutlives<'b, T>)
63   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
64
65error: aborting due to 4 previous errors
66
67For more information about this error, try `rustc --explain E0309`.