1 note: External requirements
2 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:37:26
4 LL | with_signature(a, b, |x, y| {
5 | __________________________^
6 LL | | //~^ ERROR the parameter type `T` may not live long enough
8 LL | | // See `correct_region`, which explains the point of this
10 LL | | require(&x, &y)
14 = note: defining type: DefId(0/1:16 ~ 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: number of external vids: 4
20 = note: where T: '_#1r
22 note: No external requirements
23 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:36:1
25 LL | / fn no_region<'a, T>(a: Cell<&'a ()>, b: T) {
26 LL | | with_signature(a, b, |x, y| {
27 LL | | //~^ ERROR the parameter type `T` may not live long enough
34 = note: defining type: DefId(0/0:6 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]) with substs [
38 error[E0309]: the parameter type `T` may not live long enough
39 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:37:26
41 LL | with_signature(a, b, |x, y| {
42 | __________________________^
43 LL | | //~^ ERROR the parameter type `T` may not live long enough
45 LL | | // See `correct_region`, which explains the point of this
47 LL | | require(&x, &y)
51 = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:6 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]), BrNamed(crate0:DefIndex(1:14), 'a))`...
53 note: External requirements
54 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:53:26
56 LL | with_signature(a, b, |x, y| {
57 | __________________________^
58 LL | | // Key point of this test:
60 LL | | // The *closure* is being type-checked with all of its free
62 LL | | require(&x, &y)
66 = note: defining type: DefId(0/1:19 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]::{{closure}}[0]) with closure substs [
70 extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T))
72 = note: number of external vids: 4
73 = note: where T: '_#2r
75 note: No external requirements
76 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:49:1
78 LL | / fn correct_region<'a, T>(a: Cell<&'a ()>, b: T)
87 = note: defining type: DefId(0/0:7 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]) with substs [
92 note: External requirements
93 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:74:26
95 LL | with_signature(a, b, |x, y| {
96 | __________________________^
97 LL | | //~^ ERROR the parameter type `T` may not live long enough
98 LL | | // See `correct_region`
99 LL | | require(&x, &y)
103 = note: defining type: DefId(0/1:23 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]::{{closure}}[0]) with closure substs [
107 extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T))
109 = note: number of external vids: 5
110 = note: where T: '_#2r
112 note: No external requirements
113 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:70:1
115 LL | / fn wrong_region<'a, 'b, T>(a: Cell<&'a ()>, b: T)
124 = note: defining type: DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]) with substs [
129 error[E0309]: the parameter type `T` may not live long enough
130 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:74:26
132 LL | with_signature(a, b, |x, y| {
133 | __________________________^
134 LL | | //~^ ERROR the parameter type `T` may not live long enough
135 LL | | // See `correct_region`
136 LL | | require(&x, &y)
140 = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]), BrNamed(crate0:DefIndex(1:20), 'a))`...
142 note: External requirements
143 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:87:26
145 LL | with_signature(a, b, |x, y| {
146 | __________________________^
147 LL | | // See `correct_region`
148 LL | | require(&x, &y)
152 = note: defining type: DefId(0/1:27 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [
157 extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T))
159 = note: number of external vids: 5
160 = note: where T: '_#3r
162 note: No external requirements
163 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:82:1
165 LL | / fn outlives_region<'a, 'b, T>(a: Cell<&'a ()>, b: T)
174 = note: defining type: DefId(0/0:9 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[0]) with substs [
180 error: aborting due to 2 previous errors
182 For more information about this error, try `rustc --explain E0309`.