]> git.proxmox.com Git - rustc.git/blame - src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / nll / ty-outlives / ty-param-closure-outlives-from-where-clause.stderr
CommitLineData
dfeec247 1note: external requirements
0731742a 2 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:27:26
ff7c6d11 3 |
0531ce1d 4LL | with_signature(a, b, |x, y| {
ff7c6d11 5 | __________________________^
532ac7d7 6LL | |
0531ce1d
XL
7LL | | //
8LL | | // See `correct_region`, which explains the point of this
ff7c6d11 9... |
b7449926 10LL | | require(&x, &y)
0531ce1d 11LL | | })
ff7c6d11
XL
12 | |_____^
13 |
1b1a35ee 14 = note: defining type: no_region::<T>::{closure#0} with closure substs [
ff7c6d11 15 i32,
532ac7d7 16 extern "rust-call" fn((std::cell::Cell<&'_#1r ()>, T)),
ba9703b0 17 (),
ff7c6d11 18 ]
b7449926
XL
19 = note: late-bound region is '_#2r
20 = note: number of external vids: 3
ff7c6d11
XL
21 = note: where T: '_#1r
22
dfeec247 23note: no external requirements
0731742a 24 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:26:1
0531ce1d
XL
25 |
26LL | / fn no_region<'a, T>(a: Cell<&'a ()>, b: T) {
27LL | | with_signature(a, b, |x, y| {
532ac7d7 28LL | |
0531ce1d
XL
29LL | | //
30... |
31LL | | })
32LL | | }
33 | |_^
34 |
60c5eb7d 35 = note: defining type: no_region::<T>
0531ce1d 36
b7449926 37error[E0309]: the parameter type `T` may not live long enough
0731742a 38 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:27:26
b7449926
XL
39 |
40LL | with_signature(a, b, |x, y| {
41 | __________________________^
532ac7d7 42LL | |
b7449926
XL
43LL | | //
44LL | | // See `correct_region`, which explains the point of this
45... |
46LL | | require(&x, &y)
47LL | | })
48 | |_____^
49 |
dfeec247 50 = help: consider adding an explicit lifetime bound `T: 'a`...
b7449926 51
dfeec247 52note: external requirements
0731742a 53 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:43:26
ff7c6d11 54 |
0531ce1d 55LL | with_signature(a, b, |x, y| {
ff7c6d11 56 | __________________________^
0531ce1d
XL
57LL | | // Key point of this test:
58LL | | //
59LL | | // The *closure* is being type-checked with all of its free
ff7c6d11 60... |
0531ce1d
XL
61LL | | require(&x, &y)
62LL | | })
ff7c6d11
XL
63 | |_____^
64 |
1b1a35ee 65 = note: defining type: correct_region::<'_#1r, T>::{closure#0} with closure substs [
ff7c6d11 66 i32,
532ac7d7 67 extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
ba9703b0 68 (),
ff7c6d11 69 ]
b7449926 70 = note: number of external vids: 3
ff7c6d11
XL
71 = note: where T: '_#2r
72
dfeec247 73note: no external requirements
0731742a 74 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:39:1
ff7c6d11 75 |
0531ce1d
XL
76LL | / fn correct_region<'a, T>(a: Cell<&'a ()>, b: T)
77LL | | where
78LL | | T: 'a,
79LL | | {
80... |
81LL | | })
82LL | | }
83 | |_^
ff7c6d11 84 |
60c5eb7d 85 = note: defining type: correct_region::<'_#1r, T>
ff7c6d11 86
dfeec247 87note: external requirements
0731742a 88 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:64:26
ff7c6d11 89 |
0531ce1d 90LL | with_signature(a, b, |x, y| {
ff7c6d11 91 | __________________________^
532ac7d7 92LL | |
0531ce1d
XL
93LL | | // See `correct_region`
94LL | | require(&x, &y)
0531ce1d 95LL | | })
ff7c6d11
XL
96 | |_____^
97 |
1b1a35ee 98 = note: defining type: wrong_region::<'_#1r, T>::{closure#0} with closure substs [
ff7c6d11 99 i32,
532ac7d7 100 extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
ba9703b0 101 (),
ff7c6d11 102 ]
b7449926
XL
103 = note: late-bound region is '_#3r
104 = note: number of external vids: 4
0531ce1d 105 = note: where T: '_#2r
ff7c6d11 106
dfeec247 107note: no external requirements
0731742a 108 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:60:1
ff7c6d11 109 |
0531ce1d
XL
110LL | / fn wrong_region<'a, 'b, T>(a: Cell<&'a ()>, b: T)
111LL | | where
112LL | | T: 'b,
113LL | | {
ff7c6d11 114... |
0531ce1d
XL
115LL | | })
116LL | | }
ff7c6d11
XL
117 | |_^
118 |
60c5eb7d 119 = note: defining type: wrong_region::<'_#1r, T>
ff7c6d11 120
b7449926 121error[E0309]: the parameter type `T` may not live long enough
0731742a 122 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:64:26
b7449926
XL
123 |
124LL | with_signature(a, b, |x, y| {
125 | __________________________^
532ac7d7 126LL | |
b7449926
XL
127LL | | // See `correct_region`
128LL | | require(&x, &y)
129LL | | })
130 | |_____^
131 |
dfeec247 132 = help: consider adding an explicit lifetime bound `T: 'a`...
b7449926 133
dfeec247 134note: external requirements
0731742a 135 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:77:26
ff7c6d11 136 |
0531ce1d 137LL | with_signature(a, b, |x, y| {
ff7c6d11 138 | __________________________^
0531ce1d
XL
139LL | | // See `correct_region`
140LL | | require(&x, &y)
141LL | | })
ff7c6d11
XL
142 | |_____^
143 |
1b1a35ee 144 = note: defining type: outlives_region::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
0531ce1d 145 i32,
532ac7d7 146 extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
ba9703b0 147 (),
ff7c6d11 148 ]
b7449926 149 = note: number of external vids: 4
0531ce1d 150 = note: where T: '_#3r
ff7c6d11 151
dfeec247 152note: no external requirements
0731742a 153 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:72:1
ff7c6d11 154 |
0531ce1d
XL
155LL | / fn outlives_region<'a, 'b, T>(a: Cell<&'a ()>, b: T)
156LL | | where
157LL | | T: 'b,
158LL | | 'b: 'a,
ff7c6d11 159... |
0531ce1d
XL
160LL | | })
161LL | | }
ff7c6d11
XL
162 | |_^
163 |
60c5eb7d 164 = note: defining type: outlives_region::<'_#1r, '_#2r, T>
ff7c6d11
XL
165
166error: aborting due to 2 previous errors
167
0531ce1d 168For more information about this error, try `rustc --explain E0309`.