]> git.lizzy.rs Git - rust.git/blob - tests/ui/rfc-2632-const-trait-impl/trait-where-clause-const.stderr
Rollup merge of #106767 - chbaker0:disable-unstable-features, r=Mark-Simulacrum
[rust.git] / tests / ui / rfc-2632-const-trait-impl / trait-where-clause-const.stderr
1 error[E0277]: the trait bound `T: ~const Bar` is not satisfied
2   --> $DIR/trait-where-clause-const.rs:19:5
3    |
4 LL |     T::b();
5    |     ^^^^^^ the trait `~const Bar` is not implemented for `T`
6    |
7 note: the trait `Bar` is implemented for `T`, but that implementation is not `const`
8   --> $DIR/trait-where-clause-const.rs:19:5
9    |
10 LL |     T::b();
11    |     ^^^^^^
12 help: consider further restricting this bound
13    |
14 LL | const fn test1<T: ~const Foo + Bar + ~const Bar>() {
15    |                                    ++++++++++++
16
17 error[E0277]: the trait bound `T: ~const Bar` is not satisfied
18   --> $DIR/trait-where-clause-const.rs:21:5
19    |
20 LL |     T::c::<T>();
21    |     ^^^^^^^^^^^ the trait `~const Bar` is not implemented for `T`
22    |
23 note: the trait `Bar` is implemented for `T`, but that implementation is not `const`
24   --> $DIR/trait-where-clause-const.rs:21:5
25    |
26 LL |     T::c::<T>();
27    |     ^^^^^^^^^^^
28 help: consider further restricting this bound
29    |
30 LL | const fn test1<T: ~const Foo + Bar + ~const Bar>() {
31    |                                    ++++++++++++
32
33 error: aborting due to 2 previous errors
34
35 For more information about this error, try `rustc --explain E0277`.