]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-block-const-bound.stderr
Rollup merge of #93016 - Amanieu:vec_spare_capacity, r=Mark-Simulacrum
[rust.git] / src / test / ui / consts / const-block-const-bound.stderr
1 error[E0277]: the trait bound `UnconstDrop: Drop` is not satisfied
2   --> $DIR/const-block-const-bound.rs:18:11
3    |
4 LL |         f(UnconstDrop);
5    |         - ^^^^^^^^^^^ the trait `Drop` is not implemented for `UnconstDrop`
6    |         |
7    |         required by a bound introduced by this call
8    |
9 note: required by a bound in `f`
10   --> $DIR/const-block-const-bound.rs:4:15
11    |
12 LL | const fn f<T: ~const Drop>(x: T) {}
13    |               ^^^^^^^^^^^ required by this bound in `f`
14 help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement
15    |
16 LL | fn main() where UnconstDrop: Drop {
17    |           +++++++++++++++++++++++
18
19 error[E0277]: the trait bound `NonDrop: Drop` is not satisfied
20   --> $DIR/const-block-const-bound.rs:20:11
21    |
22 LL |         f(NonDrop);
23    |         - ^^^^^^^ the trait `Drop` is not implemented for `NonDrop`
24    |         |
25    |         required by a bound introduced by this call
26    |
27 note: required by a bound in `f`
28   --> $DIR/const-block-const-bound.rs:4:15
29    |
30 LL | const fn f<T: ~const Drop>(x: T) {}
31    |               ^^^^^^^^^^^ required by this bound in `f`
32
33 error: aborting due to 2 previous errors
34
35 For more information about this error, try `rustc --explain E0277`.