Skip to content

Commit 82200be

Browse files
committed
Allow lint in miri tests.
1 parent 33b3487 commit 82200be

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/tools/miri/tests/pass/async-fn.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![feature(never_type)]
2+
#![allow(unreachable_code)]
23

34
use std::future::Future;
45

@@ -41,7 +42,6 @@ async fn includes_never(crash: bool, x: u32) -> u32 {
4142
}
4243

4344
async fn partial_init(x: u32) -> u32 {
44-
#[allow(unreachable_code)]
4545
let _x: (String, !) = (String::new(), return async { x + x }.await);
4646
}
4747

src/tools/miri/tests/pass/generator.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//@revisions: stack tree
22
//@[tree]compile-flags: -Zmiri-tree-borrows
33
#![feature(generators, generator_trait, never_type)]
4+
#![allow(unreachable_code)]
45

56
use std::fmt::Debug;
67
use std::mem::ManuallyDrop;
@@ -104,14 +105,12 @@ fn basic() {
104105
}
105106
#[allow(unused)]
106107
let x = never();
107-
#[allow(unreachable_code)]
108108
yield 2;
109109
drop(x);
110110
});
111111

112112
finish(3, || {
113113
yield 1;
114-
#[allow(unreachable_code)]
115114
let _x: (String, !) = (String::new(), {
116115
yield 2;
117116
return;
@@ -176,7 +175,6 @@ fn smoke_resume_arg() {
176175
)
177176
});
178177

179-
#[allow(unreachable_code)]
180178
expect_drops(2, || drain(&mut |a| yield return a, vec![(DropMe, Complete(DropMe))]));
181179

182180
expect_drops(2, || {

0 commit comments

Comments
 (0)