summary refs log tree commit diff
path: root/tests/ui/dropck/const_drop_is_valid.stderr
blob: 5837e1623a170c5786dbeca9e7a4d0b53f174f6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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`.