File: qualif-indirect-mutation-fail.stderr

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, sid, trixie
  • size: 893,396 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (117 lines) | stat: -rw-r--r-- 4,158 bytes parent folder | download | duplicates (3)
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
error[E0493]: destructor of `Option<String>` cannot be evaluated at compile-time
  --> $DIR/qualif-indirect-mutation-fail.rs:12:9
   |
LL |     let mut x = None;
   |         ^^^^^ the destructor for this type cannot be evaluated in constants
...
LL | };
   | - value is dropped here

error[E0080]: evaluation of constant value failed
  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
   |
   = note: calling non-const function `<Vec<u8> as Drop>::drop`
   |
note: inside `std::ptr::drop_in_place::<Vec<u8>> - shim(Some(Vec<u8>))`
  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
note: inside `std::ptr::drop_in_place::<String> - shim(Some(String))`
  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
note: inside `std::ptr::drop_in_place::<Option<String>> - shim(Some(Option<String>))`
  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
note: inside `A1`
  --> $DIR/qualif-indirect-mutation-fail.rs:18:1
   |
LL | };
   | ^

error[E0493]: destructor of `Option<String>` cannot be evaluated at compile-time
  --> $DIR/qualif-indirect-mutation-fail.rs:28:9
   |
LL |     let _z = x;
   |         ^^ the destructor for this type cannot be evaluated in constants
LL | };
   | - value is dropped here

error[E0080]: evaluation of constant value failed
  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
   |
   = note: calling non-const function `<Vec<u8> as Drop>::drop`
   |
note: inside `std::ptr::drop_in_place::<Vec<u8>> - shim(Some(Vec<u8>))`
  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
note: inside `std::ptr::drop_in_place::<String> - shim(Some(String))`
  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
note: inside `std::ptr::drop_in_place::<Option<String>> - shim(Some(Option<String>))`
  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
note: inside `A2`
  --> $DIR/qualif-indirect-mutation-fail.rs:29:1
   |
LL | };
   | ^

error[E0493]: destructor of `(u32, Option<String>)` cannot be evaluated at compile-time
  --> $DIR/qualif-indirect-mutation-fail.rs:6:9
   |
LL |     let mut a: (u32, Option<String>) = (0, None);
   |         ^^^^^ the destructor for this type cannot be evaluated in constant functions
LL |     let _ = &mut a.1;
LL | }
   | - value is dropped here

error[E0493]: destructor of `Option<T>` cannot be evaluated at compile-time
  --> $DIR/qualif-indirect-mutation-fail.rs:33:9
   |
LL |     let x: Option<T> = None;
   |         ^ the destructor for this type cannot be evaluated in constant functions
LL |     let _ = x.is_some();
LL | }
   | - value is dropped here

error[E0493]: destructor of `Option<T>` cannot be evaluated at compile-time
  --> $DIR/qualif-indirect-mutation-fail.rs:41:9
   |
LL |     let _y = x;
   |         ^^ the destructor for this type cannot be evaluated in constant functions
LL | }
   | - value is dropped here

error[E0493]: destructor of `Option<String>` cannot be evaluated at compile-time
  --> $DIR/qualif-indirect-mutation-fail.rs:49:9
   |
LL |     let mut y: Option<String> = None;
   |         ^^^^^ the destructor for this type cannot be evaluated in constant functions
LL |     std::ptr::addr_of_mut!(y);
LL | }
   | - value is dropped here

error[E0493]: destructor of `Option<String>` cannot be evaluated at compile-time
  --> $DIR/qualif-indirect-mutation-fail.rs:46:9
   |
LL |     let mut x: Option<String> = None;
   |         ^^^^^ the destructor for this type cannot be evaluated in constant functions
...
LL | }
   | - value is dropped here

error[E0493]: destructor of `Option<String>` cannot be evaluated at compile-time
  --> $DIR/qualif-indirect-mutation-fail.rs:59:9
   |
LL |     let y: Option<String> = None;
   |         ^ the destructor for this type cannot be evaluated in constant functions
LL |     std::ptr::addr_of!(y);
LL | }
   | - value is dropped here

error[E0493]: destructor of `Option<String>` cannot be evaluated at compile-time
  --> $DIR/qualif-indirect-mutation-fail.rs:56:9
   |
LL |     let x: Option<String> = None;
   |         ^ the destructor for this type cannot be evaluated in constant functions
...
LL | }
   | - value is dropped here

error: aborting due to 11 previous errors

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