mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 19:53:46 +00:00
112 lines
3.0 KiB
Plaintext
112 lines
3.0 KiB
Plaintext
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
|
|
--> $DIR/drop_ref.rs:10:5
|
|
|
|
|
LL | drop(&SomeStruct);
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::drop-ref` implied by `-D warnings`
|
|
note: argument has type `&SomeStruct`
|
|
--> $DIR/drop_ref.rs:10:10
|
|
|
|
|
LL | drop(&SomeStruct);
|
|
| ^^^^^^^^^^^
|
|
|
|
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
|
|
--> $DIR/drop_ref.rs:13:5
|
|
|
|
|
LL | drop(&owned1);
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
note: argument has type `&SomeStruct`
|
|
--> $DIR/drop_ref.rs:13:10
|
|
|
|
|
LL | drop(&owned1);
|
|
| ^^^^^^^
|
|
|
|
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
|
|
--> $DIR/drop_ref.rs:14:5
|
|
|
|
|
LL | drop(&&owned1);
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
note: argument has type `&&SomeStruct`
|
|
--> $DIR/drop_ref.rs:14:10
|
|
|
|
|
LL | drop(&&owned1);
|
|
| ^^^^^^^^
|
|
|
|
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
|
|
--> $DIR/drop_ref.rs:15:5
|
|
|
|
|
LL | drop(&mut owned1);
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
note: argument has type `&mut SomeStruct`
|
|
--> $DIR/drop_ref.rs:15:10
|
|
|
|
|
LL | drop(&mut owned1);
|
|
| ^^^^^^^^^^^
|
|
|
|
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
|
|
--> $DIR/drop_ref.rs:19:5
|
|
|
|
|
LL | drop(reference1);
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
note: argument has type `&SomeStruct`
|
|
--> $DIR/drop_ref.rs:19:10
|
|
|
|
|
LL | drop(reference1);
|
|
| ^^^^^^^^^^
|
|
|
|
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
|
|
--> $DIR/drop_ref.rs:22:5
|
|
|
|
|
LL | drop(reference2);
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
note: argument has type `&mut SomeStruct`
|
|
--> $DIR/drop_ref.rs:22:10
|
|
|
|
|
LL | drop(reference2);
|
|
| ^^^^^^^^^^
|
|
|
|
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
|
|
--> $DIR/drop_ref.rs:25:5
|
|
|
|
|
LL | drop(reference3);
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
note: argument has type `&SomeStruct`
|
|
--> $DIR/drop_ref.rs:25:10
|
|
|
|
|
LL | drop(reference3);
|
|
| ^^^^^^^^^^
|
|
|
|
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
|
|
--> $DIR/drop_ref.rs:30:5
|
|
|
|
|
LL | drop(&val);
|
|
| ^^^^^^^^^^
|
|
|
|
|
note: argument has type `&T`
|
|
--> $DIR/drop_ref.rs:30:10
|
|
|
|
|
LL | drop(&val);
|
|
| ^^^^
|
|
|
|
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
|
|
--> $DIR/drop_ref.rs:38:5
|
|
|
|
|
LL | std::mem::drop(&SomeStruct);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
note: argument has type `&SomeStruct`
|
|
--> $DIR/drop_ref.rs:38:20
|
|
|
|
|
LL | std::mem::drop(&SomeStruct);
|
|
| ^^^^^^^^^^^
|
|
|
|
error: aborting due to 9 previous errors
|
|
|