about summary refs log tree commit diff
path: root/src/test/incremental
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-11-22 04:06:52 +0000
committerbors <bors@rust-lang.org>2019-11-22 04:06:52 +0000
commitbd816fd76f4f7a040ca7ac8ca5bc556d761f96fa (patch)
tree0bfe068351cf25b176f2d8ab16c43ae33eb69f68 /src/test/incremental
parentabd69551bf8b8755b5e00d4f4d45ae5d4a0cd17d (diff)
parentc537f229009bcec23ac89132fd6f571acbc23c38 (diff)
downloadrust-bd816fd76f4f7a040ca7ac8ca5bc556d761f96fa.tar.gz
rust-bd816fd76f4f7a040ca7ac8ca5bc556d761f96fa.zip
Auto merge of #66524 - ecstatic-morse:compiletest-multiple-revisions, r=Centril
Support multiple revisions in `compiletest`

The `//[X]~` syntax filters errors for tests that are run across multiple cfgs with  `// revisions:`. This commit extends that syntax to accept `//[X,Y]~`, which will match multiple cfgs to the same error annotation. This is functionally the same as writing two comments, `//[X]~` and `//[Y]~`, but can fit on a single line.

While refactoring `compiletest` to support this, I also uncovered a small bug that was causing an incremental test to always pass, despite no errors being emitted.

r? @Centril
Diffstat (limited to 'src/test/incremental')
-rw-r--r--src/test/incremental/warnings-reemitted.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/test/incremental/warnings-reemitted.rs b/src/test/incremental/warnings-reemitted.rs
index a1d11f8aa5b..5fc89395827 100644
--- a/src/test/incremental/warnings-reemitted.rs
+++ b/src/test/incremental/warnings-reemitted.rs
@@ -2,9 +2,8 @@
 // compile-flags: -Coverflow-checks=on
 // build-pass (FIXME(62277): could be check-pass?)
 
-#![allow(warnings)]
 #![warn(const_err)]
 
 fn main() {
-    255u8 + 1; //~ WARNING this expression will panic at run-time
+    let _ = 255u8 + 1; //~ WARNING attempt to add with overflow
 }