rust-clippy/tests/ui/drop_forget_ref.stderr

221 lines
6.3 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.
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:22:5
|
2018-10-06 16:18:06 +00:00
22 | drop(&SomeStruct);
| ^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::drop-ref` implied by `-D warnings`
note: argument has type &SomeStruct
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:22:10
|
2018-10-06 16:18:06 +00:00
22 | drop(&SomeStruct);
| ^^^^^^^^^^^
error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:23:5
|
2018-10-06 16:18:06 +00:00
23 | forget(&SomeStruct);
| ^^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::forget-ref` implied by `-D warnings`
note: argument has type &SomeStruct
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:23:12
|
2018-10-06 16:18:06 +00:00
23 | forget(&SomeStruct);
| ^^^^^^^^^^^
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:26:5
|
2018-10-06 16:18:06 +00:00
26 | drop(&owned1);
| ^^^^^^^^^^^^^
|
note: argument has type &SomeStruct
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:26:10
|
2018-10-06 16:18:06 +00:00
26 | drop(&owned1);
| ^^^^^^^
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:27:5
|
2018-10-06 16:18:06 +00:00
27 | drop(&&owned1);
| ^^^^^^^^^^^^^^
|
note: argument has type &&SomeStruct
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:27:10
|
2018-10-06 16:18:06 +00:00
27 | drop(&&owned1);
| ^^^^^^^^
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:28:5
|
2018-10-06 16:18:06 +00:00
28 | drop(&mut owned1);
| ^^^^^^^^^^^^^^^^^
|
note: argument has type &mut SomeStruct
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:28:10
|
2018-10-06 16:18:06 +00:00
28 | drop(&mut owned1);
| ^^^^^^^^^^^
error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:31:5
|
2018-10-06 16:18:06 +00:00
31 | forget(&owned2);
| ^^^^^^^^^^^^^^^
|
note: argument has type &SomeStruct
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:31:12
|
2018-10-06 16:18:06 +00:00
31 | forget(&owned2);
| ^^^^^^^
error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:32:5
|
2018-10-06 16:18:06 +00:00
32 | forget(&&owned2);
| ^^^^^^^^^^^^^^^^
|
note: argument has type &&SomeStruct
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:32:12
|
2018-10-06 16:18:06 +00:00
32 | forget(&&owned2);
| ^^^^^^^^
error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:33:5
|
2018-10-06 16:18:06 +00:00
33 | forget(&mut owned2);
| ^^^^^^^^^^^^^^^^^^^
|
note: argument has type &mut SomeStruct
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:33:12
|
2018-10-06 16:18:06 +00:00
33 | forget(&mut owned2);
| ^^^^^^^^^^^
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:37:5
|
2018-10-06 16:18:06 +00:00
37 | drop(reference1);
| ^^^^^^^^^^^^^^^^
|
note: argument has type &SomeStruct
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:37:10
|
2018-10-06 16:18:06 +00:00
37 | drop(reference1);
| ^^^^^^^^^^
error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:38:5
|
2018-10-06 16:18:06 +00:00
38 | forget(&*reference1);
| ^^^^^^^^^^^^^^^^^^^^
|
note: argument has type &SomeStruct
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:38:12
|
2018-10-06 16:18:06 +00:00
38 | forget(&*reference1);
| ^^^^^^^^^^^^
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:41:5
|
2018-10-06 16:18:06 +00:00
41 | drop(reference2);
| ^^^^^^^^^^^^^^^^
|
note: argument has type &mut SomeStruct
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:41:10
|
2018-10-06 16:18:06 +00:00
41 | drop(reference2);
| ^^^^^^^^^^
error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:43:5
|
2018-10-06 16:18:06 +00:00
43 | forget(reference3);
| ^^^^^^^^^^^^^^^^^^
|
note: argument has type &mut SomeStruct
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:43:12
|
2018-10-06 16:18:06 +00:00
43 | forget(reference3);
| ^^^^^^^^^^
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:46:5
|
2018-10-06 16:18:06 +00:00
46 | drop(reference4);
| ^^^^^^^^^^^^^^^^
|
note: argument has type &SomeStruct
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:46:10
|
2018-10-06 16:18:06 +00:00
46 | drop(reference4);
| ^^^^^^^^^^
error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:47:5
|
2018-10-06 16:18:06 +00:00
47 | forget(reference4);
| ^^^^^^^^^^^^^^^^^^
|
note: argument has type &SomeStruct
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:47:12
|
2018-10-06 16:18:06 +00:00
47 | forget(reference4);
| ^^^^^^^^^^
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:52:5
|
2018-10-06 16:18:06 +00:00
52 | drop(&val);
| ^^^^^^^^^^
|
note: argument has type &T
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:52:10
|
2018-10-06 16:18:06 +00:00
52 | drop(&val);
| ^^^^
error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:58:5
|
2018-10-06 16:18:06 +00:00
58 | forget(&val);
| ^^^^^^^^^^^^
|
note: argument has type &T
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:58:12
|
2018-10-06 16:18:06 +00:00
58 | forget(&val);
| ^^^^
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:66:5
|
2018-10-06 16:18:06 +00:00
66 | std::mem::drop(&SomeStruct);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: argument has type &SomeStruct
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:66:20
|
2018-10-06 16:18:06 +00:00
66 | std::mem::drop(&SomeStruct);
| ^^^^^^^^^^^
error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:69:5
|
2018-10-06 16:18:06 +00:00
69 | std::mem::forget(&SomeStruct);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: argument has type &SomeStruct
2018-10-06 16:18:06 +00:00
--> $DIR/drop_forget_ref.rs:69:22
|
2018-10-06 16:18:06 +00:00
69 | std::mem::forget(&SomeStruct);
| ^^^^^^^^^^^
2018-01-16 16:06:27 +00:00
error: aborting due to 18 previous errors