Debian Codegraph @

debian/rust-vendor/zerocopy/tests/ui/ptr-is-invariant-over-v.stable.stderr

raw
1 error: lifetime may not live long enough
2 --> $DIR/ptr-is-invariant-over-v.rs:21:5
3 |
4 17 | fn _when_exclusive<'big: 'small, 'small>(
5 | ---- ------ lifetime `'small` defined here
6 | |
7 | lifetime `'big` defined here
8 ...
9 21 | _small = big;
10 | ^^^^^^^^^^^^ assignment requires that `'small` must outlive `'big`
11 |
12 = help: consider adding the following bound: `'small: 'big`
13 = note: requirement occurs because of the type `Ptr<'_, &u32, (zerocopy::invariant::Exclusive, Aligned, zerocopy::invariant::Valid)>`, which makes the generic argument `&u32` invariant
14 = note: the struct `Ptr<'a, T, I>` is invariant over the parameter `T`
15 = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
16
17 error: lifetime may not live long enough
18 --> $DIR/ptr-is-invariant-over-v.rs:30:5
19 |
20 26 | fn _when_shared<'big: 'small, 'small>(
21 | ---- ------ lifetime `'small` defined here
22 | |
23 | lifetime `'big` defined here
24 ...
25 30 | _small = big;
26 | ^^^^^^^^^^^^ assignment requires that `'small` must outlive `'big`
27 |
28 = help: consider adding the following bound: `'small: 'big`
29 = note: requirement occurs because of the type `Ptr<'_, &u32, (Shared, Aligned, zerocopy::invariant::Valid)>`, which makes the generic argument `&u32` invariant
30 = note: the struct `Ptr<'a, T, I>` is invariant over the parameter `T`
31 = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
32
33 error: aborting due to 2 previous errors
34