93 lines
3.6 KiB
Plaintext
93 lines
3.6 KiB
Plaintext
error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
|
|
--> $DIR/const-drop.rs:12:16
|
|
|
|
|
LL | impl<'a> const Drop for S<'a> {
|
|
| ^^^^
|
|
|
|
|
= note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
|
|
= note: adding a non-const method body in the future would be a breaking change
|
|
|
|
error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
|
|
--> $DIR/const-drop.rs:46:16
|
|
|
|
|
LL | impl const Drop for ConstDrop {
|
|
| ^^^^
|
|
|
|
|
= note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
|
|
= note: adding a non-const method body in the future would be a breaking change
|
|
|
|
error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
|
|
--> $DIR/const-drop.rs:67:37
|
|
|
|
|
LL | impl<T: ~const SomeTrait> const Drop for ConstDropWithBound<T> {
|
|
| ^^^^
|
|
|
|
|
= note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
|
|
= note: adding a non-const method body in the future would be a breaking change
|
|
|
|
error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
|
|
--> $DIR/const-drop.rs:75:30
|
|
|
|
|
LL | impl<T: SomeTrait> const Drop for ConstDropWithNonconstBound<T> {
|
|
| ^^^^
|
|
|
|
|
= note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
|
|
= note: adding a non-const method body in the future would be a breaking change
|
|
|
|
error: `~const` can only be applied to `#[const_trait]` traits
|
|
--> $DIR/const-drop.rs:18:15
|
|
|
|
|
LL | const fn a<T: ~const Destruct>(_: T) {}
|
|
| ^^^^^^
|
|
|
|
error: `~const` can only be applied to `#[const_trait]` traits
|
|
--> $DIR/const-drop.rs:18:15
|
|
|
|
|
LL | const fn a<T: ~const Destruct>(_: T) {}
|
|
| ^^^^^^
|
|
|
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
|
|
error[E0277]: the trait bound `T: const SomeTrait` is not satisfied
|
|
--> $DIR/const-drop.rs:67:46
|
|
|
|
|
LL | impl<T: ~const SomeTrait> const Drop for ConstDropWithBound<T> {
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
note: required by a bound in `t::ConstDropWithBound`
|
|
--> $DIR/const-drop.rs:65:38
|
|
|
|
|
LL | pub struct ConstDropWithBound<T: const SomeTrait>(pub core::marker::PhantomData<T>);
|
|
| ^^^^^ required by this bound in `ConstDropWithBound`
|
|
|
|
error[E0277]: the trait bound `T: const SomeTrait` is not satisfied
|
|
--> $DIR/const-drop.rs:68:22
|
|
|
|
|
LL | fn drop(&mut self) {
|
|
| ^^^^
|
|
|
|
|
note: required by a bound in `t::ConstDropWithBound`
|
|
--> $DIR/const-drop.rs:65:38
|
|
|
|
|
LL | pub struct ConstDropWithBound<T: const SomeTrait>(pub core::marker::PhantomData<T>);
|
|
| ^^^^^ required by this bound in `ConstDropWithBound`
|
|
|
|
error[E0493]: destructor of `T` cannot be evaluated at compile-time
|
|
--> $DIR/const-drop.rs:18: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[E0277]: the trait bound `T: ~const SomeTrait` is not satisfied
|
|
--> $DIR/const-drop.rs:69:13
|
|
|
|
|
LL | T::foo();
|
|
| ^^^^^^^^
|
|
|
|
error: aborting due to 10 previous errors
|
|
|
|
Some errors have detailed explanations: E0277, E0493.
|
|
For more information about an error, try `rustc --explain E0277`.
|