]> git.lizzy.rs Git - rust.git/blob - tests/ui/wf/wf-in-foreign-fn-decls-issue-80468.stderr
Merge commit '1480cea393d0cee195e59949eabdfbcf1230f7f9' into clippyup
[rust.git] / tests / 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    |                ^^^ expected lifetime parameter
6    |
7    = note: assuming a `'static` lifetime...
8 help: indicate the anonymous lifetime
9    |
10 LL | impl Trait for Ref<'_> {}
11    |                   ++++
12
13 error: incompatible lifetime on type
14   --> $DIR/wf-in-foreign-fn-decls-issue-80468.rs:16:21
15    |
16 LL |     pub fn repro(_: Wrapper<Ref>);
17    |                     ^^^^^^^^^^^^
18    |
19 note: because this has an unmet lifetime requirement
20   --> $DIR/wf-in-foreign-fn-decls-issue-80468.rs:8:23
21    |
22 LL | pub struct Wrapper<T: Trait>(T);
23    |                       ^^^^^ introduces a `'static` lifetime requirement
24 note: the anonymous lifetime as defined here...
25   --> $DIR/wf-in-foreign-fn-decls-issue-80468.rs:16:29
26    |
27 LL |     pub fn repro(_: Wrapper<Ref>);
28    |                             ^^^
29 note: ...does not necessarily outlive the static lifetime introduced by the compatible `impl`
30   --> $DIR/wf-in-foreign-fn-decls-issue-80468.rs:13:1
31    |
32 LL | impl Trait for Ref {}
33    | ^^^^^^^^^^^^^^^^^^
34
35 error: aborting due to 2 previous errors
36
37 For more information about this error, try `rustc --explain E0726`.