rust-clippy/clippy_tests/examples/drop_forget_ref.stderr

239 lines
6.9 KiB
Text
Raw Normal View History

error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
--> drop_forget_ref.rs:12:5
|
2017-02-08 13:58:07 +00:00
12 | drop(&SomeStruct);
| ^^^^^^^^^^^^^^^^^
|
= note: `-D drop-ref` implied by `-D warnings`
note: argument has type &SomeStruct
--> drop_forget_ref.rs:12:10
|
2017-02-08 13:58:07 +00:00
12 | drop(&SomeStruct);
| ^^^^^^^^^^^
error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
--> drop_forget_ref.rs:13:5
|
2017-02-08 13:58:07 +00:00
13 | forget(&SomeStruct);
| ^^^^^^^^^^^^^^^^^^^
|
= note: `-D forget-ref` implied by `-D warnings`
note: argument has type &SomeStruct
--> drop_forget_ref.rs:13:12
|
2017-02-08 13:58:07 +00:00
13 | forget(&SomeStruct);
| ^^^^^^^^^^^
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
--> drop_forget_ref.rs:16:5
|
2017-02-08 13:58:07 +00:00
16 | drop(&owned1);
| ^^^^^^^^^^^^^
|
= note: `-D drop-ref` implied by `-D warnings`
note: argument has type &SomeStruct
--> drop_forget_ref.rs:16:10
|
2017-02-08 13:58:07 +00:00
16 | drop(&owned1);
| ^^^^^^^
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
--> drop_forget_ref.rs:17:5
|
2017-02-08 13:58:07 +00:00
17 | drop(&&owned1);
| ^^^^^^^^^^^^^^
|
= note: `-D drop-ref` implied by `-D warnings`
note: argument has type &&SomeStruct
--> drop_forget_ref.rs:17:10
|
2017-02-08 13:58:07 +00:00
17 | drop(&&owned1);
| ^^^^^^^^
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
--> drop_forget_ref.rs:18:5
|
2017-02-08 13:58:07 +00:00
18 | drop(&mut owned1);
| ^^^^^^^^^^^^^^^^^
|
= note: `-D drop-ref` implied by `-D warnings`
note: argument has type &mut SomeStruct
--> drop_forget_ref.rs:18:10
|
2017-02-08 13:58:07 +00:00
18 | drop(&mut owned1);
| ^^^^^^^^^^^
error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
--> drop_forget_ref.rs:21:5
|
2017-02-08 13:58:07 +00:00
21 | forget(&owned2);
| ^^^^^^^^^^^^^^^
|
= note: `-D forget-ref` implied by `-D warnings`
note: argument has type &SomeStruct
--> drop_forget_ref.rs:21:12
|
2017-02-08 13:58:07 +00:00
21 | forget(&owned2);
| ^^^^^^^
error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
--> drop_forget_ref.rs:22:5
|
22 | forget(&&owned2);
| ^^^^^^^^^^^^^^^^
|
= note: `-D forget-ref` implied by `-D warnings`
note: argument has type &&SomeStruct
--> drop_forget_ref.rs:22:12
|
22 | forget(&&owned2);
| ^^^^^^^^
error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
--> drop_forget_ref.rs:23:5
|
2017-02-08 13:58:07 +00:00
23 | forget(&mut owned2);
| ^^^^^^^^^^^^^^^^^^^
|
= note: `-D forget-ref` implied by `-D warnings`
note: argument has type &mut SomeStruct
--> drop_forget_ref.rs:23:12
|
2017-02-08 13:58:07 +00:00
23 | forget(&mut owned2);
| ^^^^^^^^^^^
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
--> drop_forget_ref.rs:27:5
|
27 | drop(reference1);
| ^^^^^^^^^^^^^^^^
|
= note: `-D drop-ref` implied by `-D warnings`
note: argument has type &SomeStruct
--> drop_forget_ref.rs:27:10
|
27 | drop(reference1);
| ^^^^^^^^^^
error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
--> drop_forget_ref.rs:28:5
|
2017-02-08 13:58:07 +00:00
28 | forget(&*reference1);
| ^^^^^^^^^^^^^^^^^^^^
|
= note: `-D forget-ref` implied by `-D warnings`
note: argument has type &SomeStruct
--> drop_forget_ref.rs:28:12
|
2017-02-08 13:58:07 +00:00
28 | forget(&*reference1);
| ^^^^^^^^^^^^
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
--> drop_forget_ref.rs:31:5
|
2017-02-08 13:58:07 +00:00
31 | drop(reference2);
| ^^^^^^^^^^^^^^^^
|
= note: `-D drop-ref` implied by `-D warnings`
note: argument has type &mut SomeStruct
--> drop_forget_ref.rs:31:10
|
2017-02-08 13:58:07 +00:00
31 | drop(reference2);
| ^^^^^^^^^^
error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
--> drop_forget_ref.rs:33:5
|
2017-02-08 13:58:07 +00:00
33 | forget(reference3);
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D forget-ref` implied by `-D warnings`
note: argument has type &mut SomeStruct
--> drop_forget_ref.rs:33:12
|
2017-02-08 13:58:07 +00:00
33 | forget(reference3);
| ^^^^^^^^^^
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
--> drop_forget_ref.rs:36:5
|
2017-02-08 13:58:07 +00:00
36 | drop(reference4);
| ^^^^^^^^^^^^^^^^
|
= note: `-D drop-ref` implied by `-D warnings`
note: argument has type &SomeStruct
--> drop_forget_ref.rs:36:10
|
2017-02-08 13:58:07 +00:00
36 | drop(reference4);
| ^^^^^^^^^^
error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
--> drop_forget_ref.rs:37:5
|
2017-02-08 13:58:07 +00:00
37 | forget(reference4);
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D forget-ref` implied by `-D warnings`
note: argument has type &SomeStruct
--> drop_forget_ref.rs:37:12
|
2017-02-08 13:58:07 +00:00
37 | forget(reference4);
| ^^^^^^^^^^
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
--> drop_forget_ref.rs:42:5
|
2017-02-08 13:58:07 +00:00
42 | drop(&val);
| ^^^^^^^^^^
|
= note: `-D drop-ref` implied by `-D warnings`
note: argument has type &T
--> drop_forget_ref.rs:42:10
|
2017-02-08 13:58:07 +00:00
42 | drop(&val);
| ^^^^
error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
--> drop_forget_ref.rs:48:5
|
2017-02-08 13:58:07 +00:00
48 | forget(&val);
| ^^^^^^^^^^^^
|
= note: `-D forget-ref` implied by `-D warnings`
note: argument has type &T
--> drop_forget_ref.rs:48:12
|
2017-02-08 13:58:07 +00:00
48 | forget(&val);
| ^^^^
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
--> drop_forget_ref.rs:56:5
|
56 | std::mem::drop(&SomeStruct);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D drop-ref` implied by `-D warnings`
note: argument has type &SomeStruct
--> drop_forget_ref.rs:56:20
|
56 | std::mem::drop(&SomeStruct);
| ^^^^^^^^^^^
error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
--> drop_forget_ref.rs:59:5
|
59 | std::mem::forget(&SomeStruct);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D forget-ref` implied by `-D warnings`
note: argument has type &SomeStruct
--> drop_forget_ref.rs:59:22
|
59 | std::mem::forget(&SomeStruct);
| ^^^^^^^^^^^
error: aborting due to previous error(s)
To learn more, run the command again with --verbose.