From 2664db235cc4a6d7edd5f95223c184f91b594dcb Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Fri, 14 Sep 2018 13:18:02 +0200 Subject: [PATCH] Run the newly `ui`-ified run-pass tests under `compare-mode=nll` as well. Fix #53764. --- src/bootstrap/test.rs | 5 +++-- src/test/run-pass/project-defer-unification.rs | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 92665c09f72aa..0c4816dc90458 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -755,10 +755,11 @@ default_test_with_compare_mode!(Ui { compare_mode: "nll" }); -default_test!(RunPass { +default_test_with_compare_mode!(RunPass { path: "src/test/run-pass", mode: "run-pass", - suite: "run-pass" + suite: "run-pass", + compare_mode: "nll" }); default_test!(CompileFail { diff --git a/src/test/run-pass/project-defer-unification.rs b/src/test/run-pass/project-defer-unification.rs index 901af09763b98..c4a3856bcbc2e 100644 --- a/src/test/run-pass/project-defer-unification.rs +++ b/src/test/run-pass/project-defer-unification.rs @@ -95,6 +95,10 @@ pub fn index_colors(image: &ImageBuffer>) -> ImageBuffer, Vec> where Pix: Pixel + 'static, { + // When NLL-enabled, `let mut` below is deemed unnecessary (due to + // the remaining code being unreachable); so ignore that lint. + #![allow(unused_mut)] + let mut indices: ImageBuffer<_,Vec<_>> = loop { }; for (pixel, idx) in image.pixels().zip(indices.pixels_mut()) { // failured occurred here ^^ because we were requiring that we