]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2632-const-trait-impl/issue-102985.stderr
Auto merge of #102684 - JhonnyBillM:delete-target-data-layout-errors-wrapper, r=davidtwco
[rust.git] / src / test / ui / rfc-2632-const-trait-impl / issue-102985.stderr
1 error[E0277]: the trait bound `[closure@$DIR/issue-102985.rs:4:23: 4:25]: ~const Fn<()>` is not satisfied
2   --> $DIR/issue-102985.rs:5:14
3    |
4 LL |         n => n(),
5    |              ^^^ expected an `Fn<()>` closure, found `[closure@$DIR/issue-102985.rs:4:23: 4:25]`
6    |
7    = help: the trait `~const Fn<()>` is not implemented for closure `[closure@$DIR/issue-102985.rs:4:23: 4:25]`
8 note: the trait `Fn<()>` is implemented for `[closure@$DIR/issue-102985.rs:4:23: 4:25]`, but that implementation is not `const`
9   --> $DIR/issue-102985.rs:5:14
10    |
11 LL |         n => n(),
12    |              ^^^
13    = note: wrap the `[closure@$DIR/issue-102985.rs:4:23: 4:25]` in a closure with no arguments: `|| { /* code */ }`
14
15 error[E0015]: cannot call non-const fn `Bug::inner::{constant#0}::{closure#0}` in constants
16   --> $DIR/issue-102985.rs:5:14
17    |
18 LL |         n => n(),
19    |              ^^^
20    |
21    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
22
23 error: aborting due to 2 previous errors
24
25 Some errors have detailed explanations: E0015, E0277.
26 For more information about an error, try `rustc --explain E0015`.