]> git.proxmox.com Git - rustc.git/blame - src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.stock.stderr
Update unsuspicious file list
[rustc.git] / src / test / ui / rfc-2632-const-trait-impl / const-drop-fail.stock.stderr
CommitLineData
5e7ed085 1error[E0277]: can't drop `NonTrivialDrop` in const contexts
2b03887a 2 --> $DIR/const-drop-fail.rs:44:5
c295e0f8
XL
3 |
4LL | const _: () = check($exp);
5 | ----- required by a bound introduced by this call
6...
7LL | NonTrivialDrop,
f2b60f7d 8 | ^^^^^^^^^^^^^^ the trait `~const Destruct` is not implemented for `NonTrivialDrop`
c295e0f8 9 |
5e7ed085 10 = note: the trait bound `NonTrivialDrop: ~const Destruct` is not satisfied
c295e0f8 11note: required by a bound in `check`
2b03887a 12 --> $DIR/const-drop-fail.rs:35:19
c295e0f8 13 |
5e7ed085
FG
14LL | const fn check<T: ~const Destruct>(_: T) {}
15 | ^^^^^^^^^^^^^^^ required by this bound in `check`
5099ac24
FG
16help: consider borrowing here
17 |
18LL | &NonTrivialDrop,
19 | +
20LL | &mut NonTrivialDrop,
21 | ++++
c295e0f8 22
5e7ed085 23error[E0277]: can't drop `NonTrivialDrop` in const contexts
2b03887a 24 --> $DIR/const-drop-fail.rs:46:5
c295e0f8
XL
25 |
26LL | const _: () = check($exp);
27 | ----- required by a bound introduced by this call
28...
29LL | ConstImplWithDropGlue(NonTrivialDrop),
5e7ed085 30 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `ConstImplWithDropGlue`, the trait `~const Destruct` is not implemented for `NonTrivialDrop`
c295e0f8 31 |
5e7ed085 32note: the trait `Destruct` is implemented for `NonTrivialDrop`, but that implementation is not `const`
2b03887a 33 --> $DIR/const-drop-fail.rs:46:5
5099ac24
FG
34 |
35LL | ConstImplWithDropGlue(NonTrivialDrop),
36 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
37note: required because it appears within the type `ConstImplWithDropGlue`
5e7ed085 38 --> $DIR/const-drop-fail.rs:16:8
5099ac24
FG
39 |
40LL | struct ConstImplWithDropGlue(NonTrivialDrop);
41 | ^^^^^^^^^^^^^^^^^^^^^
c295e0f8 42note: required by a bound in `check`
2b03887a 43 --> $DIR/const-drop-fail.rs:35:19
c295e0f8 44 |
5e7ed085
FG
45LL | const fn check<T: ~const Destruct>(_: T) {}
46 | ^^^^^^^^^^^^^^^ required by this bound in `check`
c295e0f8 47
2b03887a
FG
48error[E0277]: the trait bound `NonTrivialDrop: ~const A` is not satisfied
49 --> $DIR/const-drop-fail.rs:48:47
c295e0f8
XL
50 |
51LL | ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),
2b03887a
FG
52 | ----------------------------------------- ^^^^^^^^^^^ the trait `~const A` is not implemented for `NonTrivialDrop`
53 | |
54 | required by a bound introduced by this call
c295e0f8 55 |
2b03887a
FG
56note: the trait `A` is implemented for `NonTrivialDrop`, but that implementation is not `const`
57 --> $DIR/const-drop-fail.rs:48:47
c295e0f8 58 |
2b03887a
FG
59LL | ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),
60 | ^^^^^^^^^^^
61note: required by a bound in `ConstDropImplWithBounds`
62 --> $DIR/const-drop-fail.rs:27:35
c295e0f8 63 |
2b03887a
FG
64LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
65 | ^^^^^^^^ required by this bound in `ConstDropImplWithBounds`
66
67error[E0277]: the trait bound `NonTrivialDrop: ~const A` is not satisfied
68 --> $DIR/const-drop-fail.rs:48:5
c295e0f8 69 |
2b03887a
FG
70LL | ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),
71 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const A` is not implemented for `NonTrivialDrop`
72 |
73note: the trait `A` is implemented for `NonTrivialDrop`, but that implementation is not `const`
74 --> $DIR/const-drop-fail.rs:48:5
75 |
76LL | ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),
77 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
78note: required by a bound in `ConstDropImplWithBounds`
79 --> $DIR/const-drop-fail.rs:27:35
80 |
81LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
82 | ^^^^^^^^ required by this bound in `ConstDropImplWithBounds`
83
84error[E0367]: `Drop` impl requires `T: ~const A` but the struct it is implemented for does not
85 --> $DIR/const-drop-fail.rs:55:9
86 |
87LL | impl<T: ~const A> const Drop for ConstDropImplWithNonConstBounds<T> {
88 | ^^^^^^^^
89 |
90note: the implementor must specify the same requirement
91 --> $DIR/const-drop-fail.rs:53:1
92 |
93LL | struct ConstDropImplWithNonConstBounds<T: A>(PhantomData<T>);
94 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
c295e0f8 95
2b03887a 96error: aborting due to 5 previous errors
c295e0f8 97
2b03887a
FG
98Some errors have detailed explanations: E0277, E0367.
99For more information about an error, try `rustc --explain E0277`.