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