rust/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

123 lines
3.7 KiB
Plaintext
Raw Normal View History

2020-01-10 08:13:05 -06:00
note: external requirements
2018-12-25 09:56:47 -06:00
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:27:26
|
LL | with_signature(a, b, |x, y| {
| ^^^^^^
|
= note: defining type: no_region::<T>::{closure#0} with closure substs [
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
= note: where T: '_#1r
2020-01-10 08:13:05 -06:00
note: no external requirements
2018-12-25 09:56:47 -06:00
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:26:1
|
LL | fn no_region<'a, T>(a: Cell<&'a ()>, b: T) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: no_region::<T>
error[E0309]: the parameter type `T` may not live long enough
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:32:9
|
LL | require(&x, &y)
| ^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
2022-03-14 09:56:37 -05:00
|
help: consider adding an explicit lifetime bound...
|
LL | fn no_region<'a, T: 'a>(a: Cell<&'a ()>, b: T) {
| ++++
2020-01-10 08:13:05 -06:00
note: external requirements
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:42:26
|
LL | with_signature(a, b, |x, y| {
| ^^^^^^
|
= note: defining type: correct_region::<'_#1r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
(),
]
2018-09-06 21:57:05 -05:00
= note: number of external vids: 3
= note: where T: '_#2r
2020-01-10 08:13:05 -06:00
note: no external requirements
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:38:1
|
2018-02-22 18:42:32 -06:00
LL | / fn correct_region<'a, T>(a: Cell<&'a ()>, b: T)
LL | | where
LL | | T: 'a,
| |__________^
|
= note: defining type: correct_region::<'_#1r, T>
2020-01-10 08:13:05 -06:00
note: external requirements
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:63:26
|
LL | with_signature(a, b, |x, y| {
| ^^^^^^
|
= note: defining type: wrong_region::<'_#1r, T>::{closure#0} with closure substs [
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
= note: where T: '_#2r
2020-01-10 08:13:05 -06:00
note: no external requirements
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:59:1
|
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,
| |__________^
|
= note: defining type: wrong_region::<'_#1r, T>
error[E0309]: the parameter type `T` may not live long enough
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:65:9
|
LL | require(&x, &y)
| ^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
2022-03-14 09:56:37 -05:00
|
help: consider adding an explicit lifetime bound...
|
LL | T: 'b + 'a,
| ++++
2020-01-10 08:13:05 -06:00
note: external requirements
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:76:26
|
LL | with_signature(a, b, |x, y| {
| ^^^^^^
|
= note: defining type: outlives_region::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
(),
]
2018-09-06 21:57:05 -05:00
= note: number of external vids: 4
= note: where T: '_#3r
2020-01-10 08:13:05 -06:00
note: no external requirements
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:71:1
|
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,
| |___________^
|
= note: defining type: outlives_region::<'_#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`.