]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-block-const-bound.stderr
b5f5694ba83284d7581f60aa9ce97636ac401e39
[rust.git] / src / test / ui / consts / const-block-const-bound.stderr
1 error[E0277]: the trait bound `UnconstDrop: ~const Drop` is not satisfied
2   --> $DIR/const-block-const-bound.rs:18:11
3    |
4 LL |         f(UnconstDrop);
5    |         - ^^^^^^^^^^^ expected an implementor of trait `~const Drop`
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 borrowing here
15    |
16 LL |         f(&UnconstDrop);
17    |           +
18 LL |         f(&mut UnconstDrop);
19    |           ++++
20
21 error[E0277]: the trait bound `NonDrop: ~const Drop` is not satisfied
22   --> $DIR/const-block-const-bound.rs:20:11
23    |
24 LL |         f(NonDrop);
25    |         - ^^^^^^^ expected an implementor of trait `~const Drop`
26    |         |
27    |         required by a bound introduced by this call
28    |
29 note: required by a bound in `f`
30   --> $DIR/const-block-const-bound.rs:4:15
31    |
32 LL | const fn f<T: ~const Drop>(x: T) {}
33    |               ^^^^^^^^^^^ required by this bound in `f`
34 help: consider borrowing here
35    |
36 LL |         f(&NonDrop);
37    |           +
38 LL |         f(&mut NonDrop);
39    |           ++++
40
41 error: aborting due to 2 previous errors
42
43 For more information about this error, try `rustc --explain E0277`.