rust/tests/ui/lint/forgetting_copy_types.stderr

89 lines
2.7 KiB
Plaintext

warning: calls to `std::mem::forget` with a value that implements `Copy` does nothing
--> $DIR/forgetting_copy_types.rs:34:5
|
LL | forget(s1);
| ^^^^^^^--^
| |
| argument has type `SomeStruct`
|
= note: use `let _ = ...` to ignore the expression or result
note: the lint level is defined here
--> $DIR/forgetting_copy_types.rs:3:9
|
LL | #![warn(forgetting_copy_types)]
| ^^^^^^^^^^^^^^^^^^^^^
warning: calls to `std::mem::forget` with a value that implements `Copy` does nothing
--> $DIR/forgetting_copy_types.rs:35:5
|
LL | forget(s2);
| ^^^^^^^--^
| |
| argument has type `SomeStruct`
|
= note: use `let _ = ...` to ignore the expression or result
warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing
--> $DIR/forgetting_copy_types.rs:36:5
|
LL | forget(s3);
| ^^^^^^^--^
| |
| argument has type `&SomeStruct`
|
= note: use `let _ = ...` to ignore the expression or result
= note: `#[warn(forgetting_references)]` on by default
warning: calls to `std::mem::forget` with a value that implements `Copy` does nothing
--> $DIR/forgetting_copy_types.rs:37:5
|
LL | forget(s4);
| ^^^^^^^--^
| |
| argument has type `SomeStruct`
|
= note: use `let _ = ...` to ignore the expression or result
warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing
--> $DIR/forgetting_copy_types.rs:38:5
|
LL | forget(s5);
| ^^^^^^^--^
| |
| argument has type `&SomeStruct`
|
= note: use `let _ = ...` to ignore the expression or result
warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing
--> $DIR/forgetting_copy_types.rs:50:5
|
LL | forget(a2);
| ^^^^^^^--^
| |
| argument has type `&AnotherStruct`
|
= note: use `let _ = ...` to ignore the expression or result
warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing
--> $DIR/forgetting_copy_types.rs:52:5
|
LL | forget(a3);
| ^^^^^^^--^
| |
| argument has type `&AnotherStruct`
|
= note: use `let _ = ...` to ignore the expression or result
warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing
--> $DIR/forgetting_copy_types.rs:53:5
|
LL | forget(a4);
| ^^^^^^^--^
| |
| argument has type `&AnotherStruct`
|
= note: use `let _ = ...` to ignore the expression or result
warning: 8 warnings emitted