rust/tests/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr
2023-07-14 13:27:35 +01:00

153 lines
5.0 KiB
Plaintext

note: external requirements
--> $DIR/projection-one-region-trait-bound-closure.rs:37:29
|
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
= note: defining type: no_relationships_late::<'?1, T>::{closure#0} with closure args [
i32,
extern "rust-call" fn((std::cell::Cell<&'?2 ()>, T)),
(),
]
= note: late-bound region is '?3
= note: number of external vids: 4
= note: where '?1: '?2
note: no external requirements
--> $DIR/projection-one-region-trait-bound-closure.rs:33:1
|
LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'b>,
| |____________________^
|
= note: defining type: no_relationships_late::<'?1, T>
error: lifetime may not live long enough
--> $DIR/projection-one-region-trait-bound-closure.rs:37:39
|
LL | fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
| -- -- lifetime `'b` defined here
| |
| lifetime `'a` defined here
...
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a`
|
= help: consider adding the following bound: `'b: 'a`
note: external requirements
--> $DIR/projection-one-region-trait-bound-closure.rs:47:29
|
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
= note: defining type: no_relationships_early::<'?1, '?2, T>::{closure#0} with closure args [
i32,
extern "rust-call" fn((std::cell::Cell<&'?3 ()>, T)),
(),
]
= note: number of external vids: 4
= note: where '?2: '?3
note: no external requirements
--> $DIR/projection-one-region-trait-bound-closure.rs:42:1
|
LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'b>,
LL | | 'a: 'a,
| |___________^
|
= note: defining type: no_relationships_early::<'?1, '?2, T>
error: lifetime may not live long enough
--> $DIR/projection-one-region-trait-bound-closure.rs:47:39
|
LL | fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
| -- -- lifetime `'b` defined here
| |
| lifetime `'a` defined here
...
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a`
|
= help: consider adding the following bound: `'b: 'a`
note: external requirements
--> $DIR/projection-one-region-trait-bound-closure.rs:60:29
|
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
= note: defining type: projection_outlives::<'?1, '?2, T>::{closure#0} with closure args [
i32,
extern "rust-call" fn((std::cell::Cell<&'?3 ()>, T)),
(),
]
= note: number of external vids: 4
= note: where <T as Anything<'?2>>::AssocType: '?3
note: no external requirements
--> $DIR/projection-one-region-trait-bound-closure.rs:52:1
|
LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'b>,
LL | | T::AssocType: 'a,
| |_____________________^
|
= note: defining type: projection_outlives::<'?1, '?2, T>
note: external requirements
--> $DIR/projection-one-region-trait-bound-closure.rs:69:29
|
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
= note: defining type: elements_outlive::<'?1, '?2, T>::{closure#0} with closure args [
i32,
extern "rust-call" fn((std::cell::Cell<&'?3 ()>, T)),
(),
]
= note: number of external vids: 4
= note: where '?2: '?3
note: no external requirements
--> $DIR/projection-one-region-trait-bound-closure.rs:64:1
|
LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'b>,
LL | | 'b: 'a,
| |___________^
|
= note: defining type: elements_outlive::<'?1, '?2, T>
note: external requirements
--> $DIR/projection-one-region-trait-bound-closure.rs:81:29
|
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
= note: defining type: one_region::<'?1, T>::{closure#0} with closure args [
i32,
extern "rust-call" fn((std::cell::Cell<&'?2 ()>, T)),
(),
]
= note: number of external vids: 3
= note: where '?1: '?2
note: no external requirements
--> $DIR/projection-one-region-trait-bound-closure.rs:73:1
|
LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'a>,
| |____________________^
|
= note: defining type: one_region::<'?1, T>
error: aborting due to 2 previous errors