Skip to content

Commit

Permalink
Auto merge of #1877 - hyd-dev:rustup, r=RalfJung
Browse files Browse the repository at this point in the history
Add `#[allow(unreachable_code)]` to `drop(x)` in `tests/run-pass/generator.rs`

The test [starts to trigger this warning](https://github.com/rust-lang/miri/runs/3408355084?check_suite_focus=true#step:8:264) (I guess it's caused by rust-lang/rust#85556). The warning seems correct, but the unreachable code in that test also seems reasonable.
  • Loading branch information
bors committed Aug 24, 2021
2 parents 94ae910 + 33a67c6 commit 08ca560
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
73d96b090bb68065cd3a469b27cbd568e39bf0e7
f66e825f73d2bd7f8a763b723983850f891985b0
1 change: 1 addition & 0 deletions tests/run-pass/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ fn basic() {
#[allow(unused)]
let x = never();
yield 2;
#[allow(unreachable_code)]
drop(x);
});

Expand Down

0 comments on commit 08ca560

Please sign in to comment.