fork/rust

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

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

master
2.7 KiB79 linesraw
1warning: function cannot return without recursing
2  --> $DIR/hrtb-perfect-forwarding.rs:16:1
3   |
4LL | / fn no_hrtb<'b, T>(mut t: T)
5LL | | where
6LL | |     T: Bar<&'b isize>,
7   | |______________________^ cannot return without recursing
8...
9LL |       no_hrtb(&mut t);
10   |       --------------- recursive call site
11   |
12   = help: a `loop` may express intention better if this is on purpose
13   = note: `#[warn(unconditional_recursion)]` on by default
14
15warning: function cannot return without recursing
16  --> $DIR/hrtb-perfect-forwarding.rs:25:1
17   |
18LL | / fn bar_hrtb<T>(mut t: T)
19LL | | where
20LL | |     T: for<'b> Bar<&'b isize>,
21   | |______________________________^ cannot return without recursing
22...
23LL |       bar_hrtb(&mut t);
24   |       ---------------- recursive call site
25   |
26   = help: a `loop` may express intention better if this is on purpose
27
28warning: function cannot return without recursing
29  --> $DIR/hrtb-perfect-forwarding.rs:35:1
30   |
31LL | / fn foo_hrtb_bar_not<'b, T>(mut t: T)
32LL | | where
33LL | |     T: for<'a> Foo<&'a isize> + Bar<&'b isize>,
34   | |_______________________________________________^ cannot return without recursing
35...
36LL |       foo_hrtb_bar_not(&mut t);
37   |       ------------------------ recursive call site
38   |
39   = help: a `loop` may express intention better if this is on purpose
40
41error: lifetime may not live long enough
42  --> $DIR/hrtb-perfect-forwarding.rs:43:5
43   |
44LL | fn foo_hrtb_bar_not<'b, T>(mut t: T)
45   |                     -- lifetime `'b` defined here
46...
47LL |     foo_hrtb_bar_not(&mut t);
48   |     ^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'b` must outlive `'static`
49   |
50note: due to current limitations in the borrow checker, this implies a `'static` lifetime
51  --> $DIR/hrtb-perfect-forwarding.rs:37:8
52   |
53LL |     T: for<'a> Foo<&'a isize> + Bar<&'b isize>,
54   |        ^^^^^^^^^^^^^^^^^^^^^^
55
56error: implementation of `Bar` is not general enough
57  --> $DIR/hrtb-perfect-forwarding.rs:43:5
58   |
59LL |     foo_hrtb_bar_not(&mut t);
60   |     ^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Bar` is not general enough
61   |
62   = note: `T` must implement `Bar<&'0 isize>`, for any lifetime `'0`...
63   = note: ...but it actually implements `Bar<&'1 isize>`, for some specific lifetime `'1`
64
65warning: function cannot return without recursing
66  --> $DIR/hrtb-perfect-forwarding.rs:48:1
67   |
68LL | / fn foo_hrtb_bar_hrtb<T>(mut t: T)
69LL | | where
70LL | |     T: for<'a> Foo<&'a isize> + for<'b> Bar<&'b isize>,
71   | |_______________________________________________________^ cannot return without recursing
72...
73LL |       foo_hrtb_bar_hrtb(&mut t);
74   |       ------------------------- recursive call site
75   |
76   = help: a `loop` may express intention better if this is on purpose
77
78error: aborting due to 2 previous errors; 4 warnings emitted
79