| error[E0277]: the trait bound `(): Trait<1>` is not satisfied |
| --> $DIR/unevaluated-const-impl-trait-ref.rs:20:13 |
| | |
| LL | needs::<1>(); |
| | ^ the trait `Trait<1>` is not implemented for `()` |
| | |
| help: `()` implements trait `Trait<N>` |
| --> $DIR/unevaluated-const-impl-trait-ref.rs:7:1 |
| | |
| LL | impl Trait<{ 1 - 1 }> for () {} |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Trait<0>` |
| LL | impl Trait<{ 1 + 1 }> for () {} |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Trait<2>` |
| note: required by a bound in `needs` |
| --> $DIR/unevaluated-const-impl-trait-ref.rs:10:38 |
| | |
| LL | fn needs<const N: usize>() where (): Trait<N> {} |
| | ^^^^^^^^ required by this bound in `needs` |
| |
| error: aborting due to 1 previous error |
| |
| For more information about this error, try `rustc --explain E0277`. |