diff options
Diffstat (limited to 'tests/ui/regions')
-rw-r--r-- | tests/ui/regions/type-param-outlives-reempty-issue-74429-2.rs | 6 | ||||
-rw-r--r-- | tests/ui/regions/type-param-outlives-reempty-issue-74429.rs | 2 |
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) {} |