fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.3 KiB36 linesraw
1error: lifetime may not live long enough
2  --> $DIR/normalization-self.rs:9:14
3   |
4LL |     fn test(x: &(), y: &()) {
5   |                - let's call the lifetime of this reference `'1`
6LL |         Self(x);
7   |              ^ this usage requires that `'1` must outlive `'static`
8
9error: lifetime may not live long enough
10  --> $DIR/normalization-self.rs:11:16
11   |
12LL |     fn test(x: &(), y: &()) {
13   |                        - let's call the lifetime of this reference `'2`
14...
15LL |         let _: Self = MyTuple(y);
16   |                ^^^^ type annotation requires that `'2` must outlive `'static`
17
18error: lifetime may not live long enough
19  --> $DIR/normalization-self.rs:19:21
20   |
21LL |     fn test(x: &(), y: &()) {
22   |                - let's call the lifetime of this reference `'1`
23LL |         Self { val: x };
24   |                     ^ this usage requires that `'1` must outlive `'static`
25
26error: lifetime may not live long enough
27  --> $DIR/normalization-self.rs:21:16
28   |
29LL |     fn test(x: &(), y: &()) {
30   |                        - let's call the lifetime of this reference `'2`
31...
32LL |         let _: Self = MyStruct { val: y };
33   |                ^^^^ type annotation requires that `'2` must outlive `'static`
34
35error: aborting due to 4 previous errors
36