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: DefId(0:14 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]::{{closure}}[0]) with closure substs [
17 extern "rust-call" fn((std::cell::Cell<&'_#1r ()>, T)),
19 = note: late-bound region is '_#2r
20 = note: number of external vids: 3
21 = note: where T: '_#1r
23 note: No external requirements
24 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:26:1
26 LL | / fn no_region<'a, T>(a: Cell<&'a ()>, b: T) {
27 LL | | with_signature(a, b, |x, y| {
35 = note: defining type: DefId(0:11 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]) with substs [
39 error[E0309]: the parameter type `T` may not live long enough
40 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:27:26
42 LL | with_signature(a, b, |x, y| {
43 | __________________________^
46 LL | | // See `correct_region`, which explains the point of this
48 LL | | require(&x, &y)
52 = 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))`...
54 note: External requirements
55 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:43:26
57 LL | with_signature(a, b, |x, y| {
58 | __________________________^
59 LL | | // Key point of this test:
61 LL | | // The *closure* is being type-checked with all of its free
63 LL | | require(&x, &y)
67 = note: defining type: DefId(0:18 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]::{{closure}}[0]) with closure substs [
71 extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
73 = note: number of external vids: 3
74 = note: where T: '_#2r
76 note: No external requirements
77 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:39:1
79 LL | / fn correct_region<'a, T>(a: Cell<&'a ()>, b: T)
88 = note: defining type: DefId(0:15 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]) with substs [
93 note: External requirements
94 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:64:26
96 LL | with_signature(a, b, |x, y| {
97 | __________________________^
99 LL | | // See `correct_region`
100 LL | | require(&x, &y)
104 = note: defining type: DefId(0:23 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]::{{closure}}[0]) with closure substs [
108 extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
110 = note: late-bound region is '_#3r
111 = note: number of external vids: 4
112 = note: where T: '_#2r
114 note: No external requirements
115 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:60:1
117 LL | / fn wrong_region<'a, 'b, T>(a: Cell<&'a ()>, b: T)
126 = note: defining type: DefId(0:19 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]) with substs [
131 error[E0309]: the parameter type `T` may not live long enough
132 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:64:26
134 LL | with_signature(a, b, |x, y| {
135 | __________________________^
137 LL | | // See `correct_region`
138 LL | | require(&x, &y)
142 = 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))`...
144 note: External requirements
145 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:77:26
147 LL | with_signature(a, b, |x, y| {
148 | __________________________^
149 LL | | // See `correct_region`
150 LL | | require(&x, &y)
154 = note: defining type: DefId(0:28 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [
159 extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
161 = note: number of external vids: 4
162 = note: where T: '_#3r
164 note: No external requirements
165 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:72:1
167 LL | / fn outlives_region<'a, 'b, T>(a: Cell<&'a ()>, b: T)
176 = note: defining type: DefId(0:24 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[0]) with substs [
182 error: aborting due to 2 previous errors
184 For more information about this error, try `rustc --explain E0309`.