]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/forget_non_drop.stderr
Auto merge of #101969 - reez12g:issue-101306, r=reez12g
[rust.git] / src / tools / clippy / tests / ui / forget_non_drop.stderr
1 error: call to `std::mem::forget` with a value that does not implement `Drop`. Forgetting such a type is the same as dropping it
2   --> $DIR/forget_non_drop.rs:13:5
3    |
4 LL |     forget(Foo);
5    |     ^^^^^^^^^^^
6    |
7    = note: `-D clippy::forget-non-drop` implied by `-D warnings`
8 note: argument has type `main::Foo`
9   --> $DIR/forget_non_drop.rs:13:12
10    |
11 LL |     forget(Foo);
12    |            ^^^
13
14 error: call to `std::mem::forget` with a value that does not implement `Drop`. Forgetting such a type is the same as dropping it
15   --> $DIR/forget_non_drop.rs:24:5
16    |
17 LL |     forget(Baz(Foo));
18    |     ^^^^^^^^^^^^^^^^
19    |
20 note: argument has type `main::Baz<main::Foo>`
21   --> $DIR/forget_non_drop.rs:24:12
22    |
23 LL |     forget(Baz(Foo));
24    |            ^^^^^^^^
25
26 error: aborting due to 2 previous errors
27