rust/tests/ui/dropck/const_drop_is_valid.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
1.2 KiB
Plaintext
Raw Normal View History

2024-07-01 20:39:48 +01:00
error[E0658]: const trait impls are experimental
2024-10-30 18:03:44 +00:00
--> $DIR/const_drop_is_valid.rs:3:6
2024-07-01 20:39:48 +01:00
|
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]`
2024-10-30 18:03:44 +00:00
--> $DIR/const_drop_is_valid.rs:3:12
2024-07-01 20:39:48 +01:00
|
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`
2024-10-30 18:03:44 +00:00
--> $DIR/const_drop_is_valid.rs:3:1
2024-07-01 20:39:48 +01:00
|
LL | impl const Drop for A {}
| ^^^^^^^^^^^^^^^^^^^^^ missing `drop` in implementation
|
= help: implement the missing item: `fn drop(&mut self) { todo!() }`
2024-10-30 18:03:44 +00:00
error: aborting due to 3 previous errors
2024-07-01 20:39:48 +01:00
Some errors have detailed explanations: E0046, E0658.
For more information about an error, try `rustc --explain E0046`.