rust/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.stock.stderr
2023-08-02 15:38:00 +00:00

29 lines
1.1 KiB
Plaintext

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
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
Some errors have detailed explanations: E0015, E0493.
For more information about an error, try `rustc --explain E0015`.