1 note: External requirements
2 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:27:26
4 LL | with_signature(a, b, |x, y| {
5 | __________________________^
8 LL | | // See `correct_region`, which explains the point of this
10 LL | | require(&x, &y)
14 = note: defining type: no_region::<T>::{{closure}}#0 with closure substs [
16 extern "rust-call" fn((std::cell::Cell<&'_#1r ()>, T)),
18 = note: late-bound region is '_#2r
19 = note: number of external vids: 3
20 = note: where T: '_#1r
22 note: No external requirements
23 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:26:1
25 LL | / fn no_region<'a, T>(a: Cell<&'a ()>, b: T) {
26 LL | | with_signature(a, b, |x, y| {
34 = note: defining type: no_region::<T>
36 error[E0309]: the parameter type `T` may not live long enough
37 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:27:26
39 LL | with_signature(a, b, |x, y| {
40 | __________________________^
43 LL | | // See `correct_region`, which explains the point of this
45 LL | | require(&x, &y)
49 = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0:11 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]), BrNamed(crate0:DefIndex(12), 'a))`...
51 note: External requirements
52 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:43:26
54 LL | with_signature(a, b, |x, y| {
55 | __________________________^
56 LL | | // Key point of this test:
58 LL | | // The *closure* is being type-checked with all of its free
60 LL | | require(&x, &y)
64 = note: defining type: correct_region::<'_#1r, T>::{{closure}}#0 with closure substs [
66 extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
68 = note: number of external vids: 3
69 = note: where T: '_#2r
71 note: No external requirements
72 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:39:1
74 LL | / fn correct_region<'a, T>(a: Cell<&'a ()>, b: T)
83 = note: defining type: correct_region::<'_#1r, T>
85 note: External requirements
86 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:64:26
88 LL | with_signature(a, b, |x, y| {
89 | __________________________^
91 LL | | // See `correct_region`
92 LL | | require(&x, &y)
96 = note: defining type: wrong_region::<'_#1r, T>::{{closure}}#0 with closure substs [
98 extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
100 = note: late-bound region is '_#3r
101 = note: number of external vids: 4
102 = note: where T: '_#2r
104 note: No external requirements
105 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:60:1
107 LL | / fn wrong_region<'a, 'b, T>(a: Cell<&'a ()>, b: T)
116 = note: defining type: wrong_region::<'_#1r, T>
118 error[E0309]: the parameter type `T` may not live long enough
119 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:64:26
121 LL | with_signature(a, b, |x, y| {
122 | __________________________^
124 LL | | // See `correct_region`
125 LL | | require(&x, &y)
129 = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0:19 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]), BrNamed(crate0:DefIndex(20), 'a))`...
131 note: External requirements
132 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:77:26
134 LL | with_signature(a, b, |x, y| {
135 | __________________________^
136 LL | | // See `correct_region`
137 LL | | require(&x, &y)
141 = note: defining type: outlives_region::<'_#1r, '_#2r, T>::{{closure}}#0 with closure substs [
143 extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
145 = note: number of external vids: 4
146 = note: where T: '_#3r
148 note: No external requirements
149 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:72:1
151 LL | / fn outlives_region<'a, 'b, T>(a: Cell<&'a ()>, b: T)
160 = note: defining type: outlives_region::<'_#1r, '_#2r, T>
162 error: aborting due to 2 previous errors
164 For more information about this error, try `rustc --explain E0309`.