]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/const-block-const-bound.stderr
New upstream version 1.65.0+dfsg1
[rustc.git] / src / test / ui / consts / const-block-const-bound.stderr
CommitLineData
5e7ed085
FG
1error[E0277]: can't drop `UnconstDrop` in const contexts
2 --> $DIR/const-block-const-bound.rs:20:11
5099ac24
FG
3 |
4LL | 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 10note: required by a bound in `f`
5e7ed085 11 --> $DIR/const-block-const-bound.rs:6:15
5099ac24 12 |
5e7ed085
FG
13LL | const fn f<T: ~const Destruct>(x: T) {}
14 | ^^^^^^^^^^^^^^^ required by this bound in `f`
5099ac24
FG
15help: consider borrowing here
16 |
17LL | f(&UnconstDrop);
18 | +
19LL | f(&mut UnconstDrop);
20 | ++++
21
5e7ed085
FG
22error[E0277]: can't drop `NonDrop` in const contexts
23 --> $DIR/const-block-const-bound.rs:22:11
5099ac24
FG
24 |
25LL | 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 31note: required by a bound in `f`
5e7ed085 32 --> $DIR/const-block-const-bound.rs:6:15
5099ac24 33 |
5e7ed085
FG
34LL | const fn f<T: ~const Destruct>(x: T) {}
35 | ^^^^^^^^^^^^^^^ required by this bound in `f`
5099ac24
FG
36help: consider borrowing here
37 |
38LL | f(&NonDrop);
39 | +
40LL | f(&mut NonDrop);
41 | ++++
42
43error: aborting due to 2 previous errors
44
45For more information about this error, try `rustc --explain E0277`.