]> git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/const-block-const-bound.stderr
Update unsuspicious file list
[rustc.git] / src / test / ui / consts / const-block-const-bound.stderr
1 error[E0277]: can't drop `UnconstDrop` in const contexts
2 --> $DIR/const-block-const-bound.rs:20:11
3 |
4 LL | f(UnconstDrop);
5 | - ^^^^^^^^^^^ the trait `~const Destruct` is not implemented for `UnconstDrop`
6 | |
7 | required by a bound introduced by this call
8 |
9 = note: the trait bound `UnconstDrop: ~const Destruct` is not satisfied
10 note: required by a bound in `f`
11 --> $DIR/const-block-const-bound.rs:6:15
12 |
13 LL | const fn f<T: ~const Destruct>(x: T) {}
14 | ^^^^^^^^^^^^^^^ required by this bound in `f`
15 help: consider borrowing here
16 |
17 LL | f(&UnconstDrop);
18 | +
19 LL | f(&mut UnconstDrop);
20 | ++++
21
22 error[E0277]: can't drop `NonDrop` in const contexts
23 --> $DIR/const-block-const-bound.rs:22:11
24 |
25 LL | f(NonDrop);
26 | - ^^^^^^^ the trait `~const Destruct` is not implemented for `NonDrop`
27 | |
28 | required by a bound introduced by this call
29 |
30 = note: the trait bound `NonDrop: ~const Destruct` is not satisfied
31 note: required by a bound in `f`
32 --> $DIR/const-block-const-bound.rs:6:15
33 |
34 LL | const fn f<T: ~const Destruct>(x: T) {}
35 | ^^^^^^^^^^^^^^^ required by this bound in `f`
36 help: consider borrowing here
37 |
38 LL | f(&NonDrop);
39 | +
40 LL | f(&mut NonDrop);
41 | ++++
42
43 error: aborting due to 2 previous errors
44
45 For more information about this error, try `rustc --explain E0277`.