]> git.lizzy.rs Git - rust.git/blob - src/test/ui/wf/wf-in-foreign-fn-decls-issue-80468.stderr
Rollup merge of #93813 - xldenis:public-mir-passes, r=wesleywiser
[rust.git] / src / test / ui / wf / wf-in-foreign-fn-decls-issue-80468.stderr
1 error[E0726]: implicit elided lifetime not allowed here
2   --> $DIR/wf-in-foreign-fn-decls-issue-80468.rs:13:16
3    |
4 LL | impl Trait for Ref {}
5    |                ^^^- help: indicate the anonymous lifetime: `<'_>`
6    |
7    = note: assuming a `'static` lifetime...
8
9 error: incompatible lifetime on type
10   --> $DIR/wf-in-foreign-fn-decls-issue-80468.rs:16:21
11    |
12 LL |     pub fn repro(_: Wrapper<Ref>);
13    |                     ^^^^^^^^^^^^
14    |
15 note: because this has an unmet lifetime requirement
16   --> $DIR/wf-in-foreign-fn-decls-issue-80468.rs:8:23
17    |
18 LL | pub struct Wrapper<T: Trait>(T);
19    |                       ^^^^^ introduces a `'static` lifetime requirement
20 note: the anonymous lifetime #1 defined here...
21   --> $DIR/wf-in-foreign-fn-decls-issue-80468.rs:16:5
22    |
23 LL |     pub fn repro(_: Wrapper<Ref>);
24    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25 note: ...does not necessarily outlive the static lifetime introduced by the compatible `impl`
26   --> $DIR/wf-in-foreign-fn-decls-issue-80468.rs:13:1
27    |
28 LL | impl Trait for Ref {}
29    | ^^^^^^^^^^^^^^^^^^^^^
30
31 error: aborting due to 2 previous errors
32