File: const-drop.precise.stderr

package info (click to toggle)
rustc-web 1.78.0%2Bdfsg1-2~deb12u3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,245,420 kB
  • sloc: xml: 147,985; javascript: 18,022; sh: 11,083; python: 10,265; ansic: 6,172; cpp: 5,023; asm: 4,390; makefile: 4,269
file content (92 lines) | stat: -rw-r--r-- 3,057 bytes parent folder | download | duplicates (2)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
error[E0493]: destructor of `S<'_>` cannot be evaluated at compile-time
  --> $DIR/const-drop.rs:24:13
   |
LL |     let _ = S(&mut c);
   |             ^^^^^^^^^ the destructor for this type cannot be evaluated in constant functions

error[E0080]: evaluation of constant value failed
  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
   |
   = note: calling non-const function `<S<'_> as Drop>::drop`
   |
note: inside `std::ptr::drop_in_place::<S<'_>> - shim(Some(S<'_>))`
  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
note: inside `b`
  --> $DIR/const-drop.rs:24:22
   |
LL |     let _ = S(&mut c);
   |                      ^
note: inside `C`
  --> $DIR/const-drop.rs:30:15
   |
LL | const C: u8 = b();
   |               ^^^

error[E0493]: destructor of `T` cannot be evaluated at compile-time
  --> $DIR/const-drop.rs:19:32
   |
LL | const fn a<T: ~const Destruct>(_: T) {}
   |                                ^ the destructor for this type cannot be evaluated in constant functions

error[E0080]: evaluation of constant value failed
  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
   |
   = note: calling non-const function `<t::ConstDrop as Drop>::drop`
   |
note: inside `std::ptr::drop_in_place::<t::ConstDrop> - shim(Some(t::ConstDrop))`
  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
note: inside `a::<t::ConstDrop>`
  --> $DIR/const-drop.rs:19:39
   |
LL | const fn a<T: ~const Destruct>(_: T) {}
   |                                       ^
note: inside `_`
  --> $DIR/const-drop.rs:35:27
   |
LL |               const _: () = a($exp);
   |                             ^^^^^^^
...
LL | / implements_const_drop! {
LL | |     1u8,
LL | |     2,
LL | |     3.0,
...  |
LL | |     Result::<i32, !>::Ok(1),
LL | | }
   | |_- in this macro invocation
   = note: this error originates in the macro `implements_const_drop` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0080]: evaluation of constant value failed
  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
   |
   = note: calling non-const function `<t::ConstDrop as Drop>::drop`
   |
note: inside `std::ptr::drop_in_place::<t::ConstDrop> - shim(Some(t::ConstDrop))`
  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
note: inside `std::ptr::drop_in_place::<t::HasConstDrop> - shim(Some(t::HasConstDrop))`
  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
note: inside `a::<t::HasConstDrop>`
  --> $DIR/const-drop.rs:19:39
   |
LL | const fn a<T: ~const Destruct>(_: T) {}
   |                                       ^
note: inside `_`
  --> $DIR/const-drop.rs:35:27
   |
LL |               const _: () = a($exp);
   |                             ^^^^^^^
...
LL | / implements_const_drop! {
LL | |     1u8,
LL | |     2,
LL | |     3.0,
...  |
LL | |     Result::<i32, !>::Ok(1),
LL | | }
   | |_- in this macro invocation
   = note: this error originates in the macro `implements_const_drop` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 5 previous errors

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