]> git.lizzy.rs Git - rust.git/blob - tests/ui/traits/issue-99875.stderr
Unify Opaque/Projection handling in region outlives code
[rust.git] / tests / ui / traits / issue-99875.stderr
1 error[E0277]: the trait bound `fn(Argument) -> Return {function}: Trait` is not satisfied
2   --> $DIR/issue-99875.rs:12:11
3    |
4 LL |     takes(function);
5    |     ----- ^^^^^^^^ the trait `Trait` is not implemented for fn item `fn(Argument) -> Return {function}`
6    |     |
7    |     required by a bound introduced by this call
8    |
9    = help: the trait `Trait` is implemented for fn pointer `fn(Argument) -> Return`
10 note: required by a bound in `takes`
11   --> $DIR/issue-99875.rs:9:18
12    |
13 LL | fn takes(_: impl Trait) {}
14    |                  ^^^^^ required by this bound in `takes`
15
16 error[E0277]: the trait bound `[closure@$DIR/issue-99875.rs:14:11: 14:34]: Trait` is not satisfied
17   --> $DIR/issue-99875.rs:14:11
18    |
19 LL |     takes(|_: Argument| -> Return { todo!() });
20    |     ----- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for closure `[closure@$DIR/issue-99875.rs:14:11: 14:34]`
21    |     |
22    |     required by a bound introduced by this call
23    |
24    = help: the trait `Trait` is implemented for fn pointer `fn(Argument) -> Return`
25 note: required by a bound in `takes`
26   --> $DIR/issue-99875.rs:9:18
27    |
28 LL | fn takes(_: impl Trait) {}
29    |                  ^^^^^ required by this bound in `takes`
30
31 error: aborting due to 2 previous errors
32
33 For more information about this error, try `rustc --explain E0277`.