summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/forgetting_copy_types.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
commit9835e2ae736235810b4ea1c162ca5e65c547e770 (patch)
tree3fcebf40ed70e581d776a8a4c65923e8ec20e026 /tests/ui/lint/forgetting_copy_types.stderr
parentReleasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff)
downloadrustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz
rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/lint/forgetting_copy_types.stderr')
-rw-r--r--tests/ui/lint/forgetting_copy_types.stderr88
1 files changed, 88 insertions, 0 deletions
diff --git a/tests/ui/lint/forgetting_copy_types.stderr b/tests/ui/lint/forgetting_copy_types.stderr
new file mode 100644
index 000000000..36d1ef5c5
--- /dev/null
+++ b/tests/ui/lint/forgetting_copy_types.stderr
@@ -0,0 +1,88 @@
+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
+