Skip to content

Commit

Permalink
Allow lint in miri tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed Jul 5, 2023
1 parent 33b3487 commit 82200be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/tools/miri/tests/pass/async-fn.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![feature(never_type)]
#![allow(unreachable_code)]

use std::future::Future;

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

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

Expand Down
4 changes: 1 addition & 3 deletions src/tools/miri/tests/pass/generator.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@revisions: stack tree
//@[tree]compile-flags: -Zmiri-tree-borrows
#![feature(generators, generator_trait, never_type)]
#![allow(unreachable_code)]

use std::fmt::Debug;
use std::mem::ManuallyDrop;
Expand Down Expand Up @@ -104,14 +105,12 @@ fn basic() {
}
#[allow(unused)]
let x = never();
#[allow(unreachable_code)]
yield 2;
drop(x);
});

finish(3, || {
yield 1;
#[allow(unreachable_code)]
let _x: (String, !) = (String::new(), {
yield 2;
return;
Expand Down Expand Up @@ -176,7 +175,6 @@ fn smoke_resume_arg() {
)
});

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

expect_drops(2, || {
Expand Down

0 comments on commit 82200be

Please sign in to comment.