]> git.lizzy.rs Git - rust.git/blob - tests/ui/dropck/drop-on-non-struct.stderr
Rollup merge of #106797 - FawazTirmizi:dev/issues/104284, r=bjorn3
[rust.git] / tests / ui / dropck / drop-on-non-struct.stderr
1 error[E0412]: cannot find type `Nonexistent` in this scope
2   --> $DIR/drop-on-non-struct.rs:9:15
3    |
4 LL | impl Drop for Nonexistent {
5    |               ^^^^^^^^^^^ not found in this scope
6
7 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
8   --> $DIR/drop-on-non-struct.rs:1:1
9    |
10 LL | impl<'a> Drop for &'a mut isize {
11    | ^^^^^^^^^^^^^^^^^^-------------
12    | |                 |
13    | |                 `isize` is not defined in the current crate
14    | impl doesn't use only types from inside the current crate
15    |
16    = note: define and implement a trait or new type instead
17
18 error[E0120]: the `Drop` trait may only be implemented for local structs, enums, and unions
19   --> $DIR/drop-on-non-struct.rs:1:19
20    |
21 LL | impl<'a> Drop for &'a mut isize {
22    |                   ^^^^^^^^^^^^^ must be a struct, enum, or union in the current crate
23
24 error: aborting due to 3 previous errors
25
26 Some errors have detailed explanations: E0117, E0120, E0412.
27 For more information about an error, try `rustc --explain E0117`.