fork/rust

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

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

master
1.2 KiB34 linesraw
1error: `T` does not live long enough
2  --> $DIR/issue-105507.rs:37:5
3   |
4LL |     require_trait(wrap);
5   |     ^^^^^^^^^^^^^^^^^^^
6   |
7note: due to current limitations in the borrow checker, this implies a `'static` lifetime
8  --> $DIR/issue-105507.rs:27:35
9   |
10LL |         for<'a> T::Projected<'a>: MyTrait,
11   |                                   ^^^^^^^
12help: consider restricting the type parameter to the `'static` lifetime
13   |
14LL | fn foo<T : MyTrait + 'static, U : MyTrait + 'static>(wrap: Wrapper<'_, Option<T>>, wrap1: Wrapper<'_, Option<U>>) {
15   |                    +++++++++              +++++++++
16
17error: `U` does not live long enough
18  --> $DIR/issue-105507.rs:39:5
19   |
20LL |     require_trait(wrap1);
21   |     ^^^^^^^^^^^^^^^^^^^^
22   |
23note: due to current limitations in the borrow checker, this implies a `'static` lifetime
24  --> $DIR/issue-105507.rs:27:35
25   |
26LL |         for<'a> T::Projected<'a>: MyTrait,
27   |                                   ^^^^^^^
28help: consider restricting the type parameter to the `'static` lifetime
29   |
30LL | fn foo<T : MyTrait + 'static, U : MyTrait + 'static>(wrap: Wrapper<'_, Option<T>>, wrap1: Wrapper<'_, Option<U>>) {
31   |                    +++++++++              +++++++++
32
33error: aborting due to 2 previous errors
34