rust/tests/ui/dropck/const_drop_is_valid.stderr
2024-11-03 18:59:31 +00:00

32 lines
1.2 KiB
Plaintext

error[E0658]: const trait impls are experimental
--> $DIR/const_drop_is_valid.rs:3:6
|
LL | impl const Drop for A {}
| ^^^^^
|
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
--> $DIR/const_drop_is_valid.rs:3:12
|
LL | impl const Drop for 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[E0046]: not all trait items implemented, missing: `drop`
--> $DIR/const_drop_is_valid.rs:3:1
|
LL | impl const Drop for A {}
| ^^^^^^^^^^^^^^^^^^^^^ missing `drop` in implementation
|
= help: implement the missing item: `fn drop(&mut self) { todo!() }`
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0046, E0658.
For more information about an error, try `rustc --explain E0046`.