From 9680f3b381767010c97b5d3ea0a14fdc19efde0c Mon Sep 17 00:00:00 2001 From: Pascal Hertleif Date: Wed, 2 May 2018 00:33:59 +0200 Subject: [PATCH] Skip NLL compiletest in rustfix mode for now --- src/tools/compiletest/src/common.rs | 4 ++-- src/tools/compiletest/src/runtest.rs | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs index 5159b1a692ef..df0cf61e7c4a 100644 --- a/src/tools/compiletest/src/common.rs +++ b/src/tools/compiletest/src/common.rs @@ -95,9 +95,9 @@ impl fmt::Display for Mode { } } -#[derive(Clone)] +#[derive(Clone, PartialEq)] pub enum CompareMode { - Nll + Nll, } impl CompareMode { diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index f0feb9b50f1b..a7c34921842d 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -2605,7 +2605,10 @@ impl<'test> TestCx<'test> { } let fixture_path = expected_output_path(&self.testpaths, None, &None, UI_FIXED); - if fixture_path.exists() { + + // TODO(killercup): Add `nll.rs.fixed` files matching + let nll = self.config.compare_mode.as_ref().map(|x| *x == CompareMode::Nll).unwrap_or(false); + if fixture_path.exists() && !nll { use std::collections::HashSet; use rustfix::{apply_suggestions, get_suggestions_from_json};