2023-07-27 10:51:02 -05:00
|
|
|
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) {}
|
|
|
|
| ^ - value is dropped here
|
|
|
|
| |
|
|
|
|
| the destructor for this type cannot be evaluated in constant functions
|
|
|
|
|
|
|
|
error[E0493]: destructor of `S<'_>` cannot be evaluated at compile-time
|
|
|
|
--> $DIR/const-drop.rs:24:13
|
|
|
|
|
|
|
|
|
LL | let _ = S(&mut c);
|
|
|
|
| ^^^^^^^^^- value is dropped here
|
|
|
|
| |
|
|
|
|
| the destructor for this type cannot be evaluated in constant functions
|
|
|
|
|
2023-07-29 03:20:25 -05:00
|
|
|
error[E0015]: cannot call non-const fn `<T as SomeTrait>::foo` in constant functions
|
|
|
|
--> $DIR/const-drop.rs:70:13
|
|
|
|
|
|
|
|
|
LL | T::foo();
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
2023-07-27 10:51:02 -05:00
|
|
|
|
2023-07-29 03:20:25 -05:00
|
|
|
Some errors have detailed explanations: E0015, E0493.
|
|
|
|
For more information about an error, try `rustc --explain E0015`.
|