File: const-drop-fail-2.precise.stderr

package info (click to toggle)
rustc-web 1.70.0%2Bdfsg1-7~deb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,517,036 kB
  • sloc: xml: 147,962; javascript: 10,210; sh: 8,590; python: 8,220; ansic: 5,901; cpp: 4,635; makefile: 4,006; asm: 2,856
file content (50 lines) | stat: -rw-r--r-- 2,245 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
error[E0277]: the trait bound `NonTrivialDrop: ~const A` is not satisfied
  --> $DIR/const-drop-fail-2.rs:31:23
   |
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const A` is not implemented for `NonTrivialDrop`
   |
note: the trait `A` is implemented for `NonTrivialDrop`, but that implementation is not `const`
  --> $DIR/const-drop-fail-2.rs:31:23
   |
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `ConstDropImplWithBounds`
  --> $DIR/const-drop-fail-2.rs:21:35
   |
LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
   |                                   ^^^^^^^^ required by this bound in `ConstDropImplWithBounds`

error[E0277]: the trait bound `NonTrivialDrop: ~const A` is not satisfied
  --> $DIR/const-drop-fail-2.rs:33:5
   |
LL |     ConstDropImplWithBounds(PhantomData)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const A` is not implemented for `NonTrivialDrop`
   |
note: the trait `A` is implemented for `NonTrivialDrop`, but that implementation is not `const`
  --> $DIR/const-drop-fail-2.rs:33:5
   |
LL |     ConstDropImplWithBounds(PhantomData)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `ConstDropImplWithBounds`
  --> $DIR/const-drop-fail-2.rs:21:35
   |
LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
   |                                   ^^^^^^^^ required by this bound in `ConstDropImplWithBounds`

error[E0367]: `Drop` impl requires `T: ~const A` but the struct it is implemented for does not
  --> $DIR/const-drop-fail-2.rs:39:9
   |
LL | impl<T: ~const A> const Drop for ConstDropImplWithNonConstBounds<T> {
   |         ^^^^^^^^
   |
note: the implementor must specify the same requirement
  --> $DIR/const-drop-fail-2.rs:37:1
   |
LL | struct ConstDropImplWithNonConstBounds<T: A>(PhantomData<T>);
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0277, E0367.
For more information about an error, try `rustc --explain E0277`.