2022-04-07 17:39:59 +00: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
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/forget_non_drop.rs:13:5
|
2022-04-07 17:39:59 +00:00
|
|
|
|
|
|
|
|
LL | forget(Foo);
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: argument has type `main::Foo`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/forget_non_drop.rs:13:12
|
2022-04-07 17:39:59 +00:00
|
|
|
|
|
|
|
|
LL | forget(Foo);
|
|
|
|
| ^^^
|
2022-09-22 16:04:22 +00:00
|
|
|
= note: `-D clippy::forget-non-drop` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::forget_non_drop)]`
|
2022-04-07 17:39:59 +00: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
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/forget_non_drop.rs:25:5
|
2022-04-07 17:39:59 +00:00
|
|
|
|
|
|
|
|
LL | forget(Baz(Foo));
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: argument has type `main::Baz<main::Foo>`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/forget_non_drop.rs:25:12
|
2022-04-07 17:39:59 +00:00
|
|
|
|
|
|
|
|
LL | forget(Baz(Foo));
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|