2017-12-04 12:04:38 -06:00
|
|
|
note: External requirements
|
2018-04-13 19:21:23 -05:00
|
|
|
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:37:26
|
2017-12-04 12:04:38 -06:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | with_signature(a, b, |x, y| {
|
2017-12-04 12:04:38 -06:00
|
|
|
| __________________________^
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | | //~^ ERROR the parameter type `T` may not live long enough
|
|
|
|
LL | | //
|
|
|
|
LL | | // See `correct_region`, which explains the point of this
|
2017-12-04 12:04:38 -06:00
|
|
|
... |
|
2018-08-31 12:27:11 -05:00
|
|
|
LL | | require(&x, &y)
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | | })
|
2017-12-04 12:04:38 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
= note: defining type: DefId(0/1:16 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]::{{closure}}[0]) with closure substs [
|
|
|
|
T,
|
|
|
|
i32,
|
|
|
|
extern "rust-call" fn((std::cell::Cell<&'_#1r ()>, T))
|
|
|
|
]
|
2018-09-07 12:35:16 -05:00
|
|
|
= note: late-bound region is '_#2r
|
2018-09-06 21:57:05 -05:00
|
|
|
= note: number of external vids: 3
|
2017-12-04 12:04:38 -06:00
|
|
|
= note: where T: '_#1r
|
|
|
|
|
|
|
|
note: No external requirements
|
2018-04-13 19:21:23 -05:00
|
|
|
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:36:1
|
2017-12-04 12:04:38 -06:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | / fn no_region<'a, T>(a: Cell<&'a ()>, b: T) {
|
|
|
|
LL | | with_signature(a, b, |x, y| {
|
|
|
|
LL | | //~^ ERROR the parameter type `T` may not live long enough
|
|
|
|
LL | | //
|
2017-12-04 12:04:38 -06:00
|
|
|
... |
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | | })
|
|
|
|
LL | | }
|
2017-12-04 12:04:38 -06:00
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
= note: defining type: DefId(0/0:6 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]) with substs [
|
|
|
|
T
|
|
|
|
]
|
|
|
|
|
2018-07-31 07:35:43 -05:00
|
|
|
error[E0309]: the parameter type `T` may not live long enough
|
|
|
|
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:37:26
|
|
|
|
|
|
|
|
|
LL | with_signature(a, b, |x, y| {
|
|
|
|
| __________________________^
|
|
|
|
LL | | //~^ ERROR the parameter type `T` may not live long enough
|
|
|
|
LL | | //
|
|
|
|
LL | | // See `correct_region`, which explains the point of this
|
|
|
|
... |
|
2018-08-31 12:27:11 -05:00
|
|
|
LL | | require(&x, &y)
|
2018-07-31 07:35:43 -05:00
|
|
|
LL | | })
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
= 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))`...
|
|
|
|
|
2018-02-22 17:46:02 -06:00
|
|
|
note: External requirements
|
2018-08-31 12:27:11 -05:00
|
|
|
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:53:26
|
2018-02-22 17:46:02 -06:00
|
|
|
|
|
2018-02-24 17:59:34 -06:00
|
|
|
LL | with_signature(a, b, |x, y| {
|
2018-02-22 17:46:02 -06:00
|
|
|
| __________________________^
|
2018-02-24 17:59:34 -06:00
|
|
|
LL | | // Key point of this test:
|
|
|
|
LL | | //
|
|
|
|
LL | | // The *closure* is being type-checked with all of its free
|
2018-02-22 17:46:02 -06:00
|
|
|
... |
|
2018-02-24 17:59:34 -06:00
|
|
|
LL | | require(&x, &y)
|
|
|
|
LL | | })
|
2018-02-22 17:46:02 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
= note: defining type: DefId(0/1:19 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]::{{closure}}[0]) with closure substs [
|
|
|
|
'_#1r,
|
|
|
|
T,
|
|
|
|
i32,
|
|
|
|
extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T))
|
|
|
|
]
|
2018-09-06 21:57:05 -05:00
|
|
|
= note: number of external vids: 3
|
2018-02-22 17:46:02 -06:00
|
|
|
= note: where T: '_#2r
|
|
|
|
|
2017-12-04 12:04:38 -06:00
|
|
|
note: No external requirements
|
2018-08-31 12:27:11 -05:00
|
|
|
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:49:1
|
2017-12-04 12:04:38 -06:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | / fn correct_region<'a, T>(a: Cell<&'a ()>, b: T)
|
|
|
|
LL | | where
|
|
|
|
LL | | T: 'a,
|
|
|
|
LL | | {
|
2017-12-04 12:04:38 -06:00
|
|
|
... |
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | | })
|
|
|
|
LL | | }
|
2017-12-04 12:04:38 -06:00
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
= note: defining type: DefId(0/0:7 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]) with substs [
|
|
|
|
'_#1r,
|
|
|
|
T
|
|
|
|
]
|
|
|
|
|
2018-02-22 17:46:02 -06:00
|
|
|
note: External requirements
|
2018-08-31 12:27:11 -05:00
|
|
|
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:74:26
|
2018-02-22 17:46:02 -06:00
|
|
|
|
|
2018-02-24 17:59:34 -06:00
|
|
|
LL | with_signature(a, b, |x, y| {
|
2018-02-22 17:46:02 -06:00
|
|
|
| __________________________^
|
2018-02-24 17:59:34 -06:00
|
|
|
LL | | //~^ ERROR the parameter type `T` may not live long enough
|
|
|
|
LL | | // See `correct_region`
|
|
|
|
LL | | require(&x, &y)
|
|
|
|
LL | | })
|
2018-02-22 17:46:02 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
= note: defining type: DefId(0/1:23 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]::{{closure}}[0]) with closure substs [
|
|
|
|
'_#1r,
|
|
|
|
T,
|
|
|
|
i32,
|
|
|
|
extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T))
|
|
|
|
]
|
2018-09-07 12:35:16 -05:00
|
|
|
= note: late-bound region is '_#3r
|
2018-09-06 21:57:05 -05:00
|
|
|
= note: number of external vids: 4
|
2018-02-22 17:46:02 -06:00
|
|
|
= note: where T: '_#2r
|
|
|
|
|
2017-12-04 12:04:38 -06:00
|
|
|
note: No external requirements
|
2018-08-31 12:27:11 -05:00
|
|
|
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:70:1
|
2017-12-04 12:04:38 -06:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | / fn wrong_region<'a, 'b, T>(a: Cell<&'a ()>, b: T)
|
|
|
|
LL | | where
|
|
|
|
LL | | T: 'b,
|
|
|
|
LL | | {
|
2017-12-04 12:04:38 -06:00
|
|
|
... |
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | | })
|
|
|
|
LL | | }
|
2017-12-04 12:04:38 -06:00
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
= note: defining type: DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]) with substs [
|
|
|
|
'_#1r,
|
|
|
|
T
|
|
|
|
]
|
|
|
|
|
2018-07-31 07:35:43 -05:00
|
|
|
error[E0309]: the parameter type `T` may not live long enough
|
2018-08-31 12:27:11 -05:00
|
|
|
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:74:26
|
2018-07-31 07:35:43 -05:00
|
|
|
|
|
|
|
|
LL | with_signature(a, b, |x, y| {
|
|
|
|
| __________________________^
|
|
|
|
LL | | //~^ ERROR the parameter type `T` may not live long enough
|
|
|
|
LL | | // See `correct_region`
|
|
|
|
LL | | require(&x, &y)
|
|
|
|
LL | | })
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
= 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))`...
|
|
|
|
|
2018-02-22 17:46:02 -06:00
|
|
|
note: External requirements
|
2018-08-31 12:27:11 -05:00
|
|
|
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:87:26
|
2018-02-22 17:46:02 -06:00
|
|
|
|
|
2018-02-24 17:59:34 -06:00
|
|
|
LL | with_signature(a, b, |x, y| {
|
2018-02-22 17:46:02 -06:00
|
|
|
| __________________________^
|
2018-02-24 17:59:34 -06:00
|
|
|
LL | | // See `correct_region`
|
|
|
|
LL | | require(&x, &y)
|
|
|
|
LL | | })
|
2018-02-22 17:46:02 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
= note: defining type: DefId(0/1:27 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [
|
|
|
|
'_#1r,
|
|
|
|
'_#2r,
|
|
|
|
T,
|
|
|
|
i32,
|
|
|
|
extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T))
|
|
|
|
]
|
2018-09-06 21:57:05 -05:00
|
|
|
= note: number of external vids: 4
|
2018-02-22 17:46:02 -06:00
|
|
|
= note: where T: '_#3r
|
|
|
|
|
2017-12-04 12:04:38 -06:00
|
|
|
note: No external requirements
|
2018-08-31 12:27:11 -05:00
|
|
|
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:82:1
|
2017-12-04 12:04:38 -06:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | / fn outlives_region<'a, 'b, T>(a: Cell<&'a ()>, b: T)
|
|
|
|
LL | | where
|
|
|
|
LL | | T: 'b,
|
|
|
|
LL | | 'b: 'a,
|
2017-12-04 12:04:38 -06:00
|
|
|
... |
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | | })
|
|
|
|
LL | | }
|
2017-12-04 12:04:38 -06:00
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
= note: defining type: DefId(0/0:9 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[0]) with substs [
|
|
|
|
'_#1r,
|
|
|
|
'_#2r,
|
|
|
|
T
|
|
|
|
]
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
2018-03-03 08:59:40 -06:00
|
|
|
For more information about this error, try `rustc --explain E0309`.
|