]>
Commit | Line | Data |
---|---|---|
5e7ed085 FG |
1 | error[E0277]: can't drop `UnconstDrop` in const contexts |
2 | --> $DIR/const-block-const-bound.rs:20:11 | |
5099ac24 FG |
3 | | |
4 | LL | f(UnconstDrop); | |
f2b60f7d | 5 | | - ^^^^^^^^^^^ the trait `~const Destruct` is not implemented for `UnconstDrop` |
5099ac24 FG |
6 | | | |
7 | | required by a bound introduced by this call | |
8 | | | |
5e7ed085 | 9 | = note: the trait bound `UnconstDrop: ~const Destruct` is not satisfied |
5099ac24 | 10 | note: required by a bound in `f` |
5e7ed085 | 11 | --> $DIR/const-block-const-bound.rs:6:15 |
5099ac24 | 12 | | |
5e7ed085 FG |
13 | LL | const fn f<T: ~const Destruct>(x: T) {} |
14 | | ^^^^^^^^^^^^^^^ required by this bound in `f` | |
5099ac24 FG |
15 | help: consider borrowing here |
16 | | | |
17 | LL | f(&UnconstDrop); | |
18 | | + | |
19 | LL | f(&mut UnconstDrop); | |
20 | | ++++ | |
21 | ||
5e7ed085 FG |
22 | error[E0277]: can't drop `NonDrop` in const contexts |
23 | --> $DIR/const-block-const-bound.rs:22:11 | |
5099ac24 FG |
24 | | |
25 | LL | f(NonDrop); | |
f2b60f7d | 26 | | - ^^^^^^^ the trait `~const Destruct` is not implemented for `NonDrop` |
5099ac24 FG |
27 | | | |
28 | | required by a bound introduced by this call | |
29 | | | |
5e7ed085 | 30 | = note: the trait bound `NonDrop: ~const Destruct` is not satisfied |
5099ac24 | 31 | note: required by a bound in `f` |
5e7ed085 | 32 | --> $DIR/const-block-const-bound.rs:6:15 |
5099ac24 | 33 | | |
5e7ed085 FG |
34 | LL | const fn f<T: ~const Destruct>(x: T) {} |
35 | | ^^^^^^^^^^^^^^^ required by this bound in `f` | |
5099ac24 FG |
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`. |