2022-04-07 12:39:59 -05:00
|
|
|
error: call to `std::mem::forget` with a value that does not implement `Drop`. Forgetting such a type is the same as dropping it
|
|
|
|
--> $DIR/forget_non_drop.rs:13:5
|
|
|
|
|
|
|
|
|
LL | forget(Foo);
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: argument has type `main::Foo`
|
|
|
|
--> $DIR/forget_non_drop.rs:13:12
|
|
|
|
|
|
|
|
|
LL | forget(Foo);
|
|
|
|
| ^^^
|
2022-09-22 11:04:22 -05:00
|
|
|
= note: `-D clippy::forget-non-drop` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::forget_non_drop)]`
|
2022-04-07 12:39:59 -05:00
|
|
|
|
|
|
|
error: call to `std::mem::forget` with a value that does not implement `Drop`. Forgetting such a type is the same as dropping it
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/forget_non_drop.rs:25:5
|
2022-04-07 12:39:59 -05:00
|
|
|
|
|
|
|
|
LL | forget(Baz(Foo));
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: argument has type `main::Baz<main::Foo>`
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/forget_non_drop.rs:25:12
|
2022-04-07 12:39:59 -05:00
|
|
|
|
|
|
|
|
LL | forget(Baz(Foo));
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|