Skip to content

Commit

Permalink
Add ignore-compare-mode-nll to some run-pass tests that become compil…
Browse files Browse the repository at this point in the history
…e-fail under rust-lang#54986.
  • Loading branch information
pnkfelix committed Oct 16, 2018
1 parent 3587ff5 commit 4229739
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/test/run-pass/issues/issue-26996.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@
// except according to those terms.

// run-pass

// This test is bogus (i.e. should be compile-fail) during the period
// where #54986 is implemented and #54987 is *not* implemented. For
// now: just ignore it under nll
//
// ignore-compare-mode-nll

// This test is checking that the write to `c.0` (which has been moved out of)
// won't overwrite the state in `c2`.
//
// That's a fine thing to test when this code is accepted by the
// compiler, and this code is being transcribed accordingly into
// the ui test issue-21232-partial-init-and-use.rs

fn main() {
let mut c = (1, "".to_owned());
match c {
Expand Down
16 changes: 16 additions & 0 deletions src/test/run-pass/issues/issue-27021.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@
// except according to those terms.

// run-pass

// This test is bogus (i.e. should be compile-fail) during the period
// where #54986 is implemented and #54987 is *not* implemented. For
// now: just ignore it under nll
//
// ignore-compare-mode-nll

// These are variants of issue-26996.rs. In all cases we are writing
// into a record field that has been moved out of, and ensuring that
// such a write won't overwrite the state of the thing it was moved
// into.
//
// That's a fine thing to test when this code is accepted by the
// compiler, and this code is being transcribed accordingly into
// the ui test issue-21232-partial-init-and-use.rs

fn main() {
let mut c = (1, (1, "".to_owned()));
match c {
Expand Down
16 changes: 16 additions & 0 deletions src/test/run-pass/issues/issue-49298.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@
#![feature(test)]
#![allow(unused_mut)] // under NLL we get warning about `x` below: rust-lang/rust#54499

// This test is bogus (i.e. should be compile-fail) during the period
// where #54986 is implemented and #54987 is *not* implemented. For
// now: just ignore it under nll
//
// ignore-compare-mode-nll

// This test is checking that the space allocated for `x.1` does not
// overlap with `y`. (The reason why such a thing happened at one
// point was because `x.0: Void` and thus the whole type of `x` was
// uninhabited, and so the compiler thought it was safe to use the
// space of `x.1` to hold `y`.)
//
// That's a fine thing to test when this code is accepted by the
// compiler, and this code is being transcribed accordingly into
// the ui test issue-21232-partial-init-and-use.rs

extern crate test;

enum Void {}
Expand Down

0 comments on commit 4229739

Please sign in to comment.