summaryrefslogtreecommitdiffstats
path: root/tests/ui/regions
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:42 +0000
commit837b550238aa671a591ccf282dddeab29cadb206 (patch)
tree914b6b8862bace72bd3245ca184d374b08d8a672 /tests/ui/regions
parentAdding debian version 1.70.0+dfsg2-1. (diff)
downloadrustc-837b550238aa671a591ccf282dddeab29cadb206.tar.xz
rustc-837b550238aa671a591ccf282dddeab29cadb206.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/regions')
-rw-r--r--tests/ui/regions/type-param-outlives-reempty-issue-74429-2.rs6
-rw-r--r--tests/ui/regions/type-param-outlives-reempty-issue-74429.rs2
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/ui/regions/type-param-outlives-reempty-issue-74429-2.rs b/tests/ui/regions/type-param-outlives-reempty-issue-74429-2.rs
index a65c17e0e..5ae5ebb45 100644
--- a/tests/ui/regions/type-param-outlives-reempty-issue-74429-2.rs
+++ b/tests/ui/regions/type-param-outlives-reempty-issue-74429-2.rs
@@ -55,11 +55,11 @@ where
}
pub fn x<T: Copy>(a: Array<T>) {
- // drop just avoids a must_use warning
- drop((0..1).filter(|_| true));
+ // _ just avoids a must_use warning
+ let _ = (0..1).filter(|_| true);
let y = a.index_axis();
a.axis_iter().for_each(|_| {
- drop(y);
+ let _ = y;
});
}
diff --git a/tests/ui/regions/type-param-outlives-reempty-issue-74429.rs b/tests/ui/regions/type-param-outlives-reempty-issue-74429.rs
index d463f311c..0c1e93144 100644
--- a/tests/ui/regions/type-param-outlives-reempty-issue-74429.rs
+++ b/tests/ui/regions/type-param-outlives-reempty-issue-74429.rs
@@ -3,6 +3,8 @@
// check-pass
+#![allow(dropping_copy_types)]
+
use std::marker::PhantomData;
fn apply<T, F: FnOnce(T)>(_: T, _: F) {}