]> git.lizzy.rs Git - rust.git/blob - tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.yy.stderr
Rollup merge of #106144 - tgross35:patch-1, r=Mark-Simulacrum
[rust.git] / tests / ui / rfc-2632-const-trait-impl / super-traits-fail-2.yy.stderr
1 error[E0277]: the trait bound `T: ~const Foo` is not satisfied
2   --> $DIR/super-traits-fail-2.rs:15:7
3    |
4 LL |     x.a();
5    |       ^ the trait `~const Foo` is not implemented for `T`
6    |
7 note: the trait `Foo` is implemented for `T`, but that implementation is not `const`
8   --> $DIR/super-traits-fail-2.rs:15:5
9    |
10 LL |     x.a();
11    |     ^
12 help: consider further restricting this bound
13    |
14 LL | const fn foo<T: Bar + ~const Foo>(x: &T) {
15    |                     ++++++++++++
16
17 error: aborting due to previous error
18
19 For more information about this error, try `rustc --explain E0277`.