diff options
| author | bors <bors@rust-lang.org> | 2019-11-03 15:14:09 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-11-03 15:14:09 +0000 |
| commit | b43a6822597061dc18cbdde1769d9815e718d7bb (patch) | |
| tree | 1adb3fbb50de2a2d756d96d99577acafca17ff58 /src/test/ui/pattern | |
| parent | 8b072926712c5856016c0d1ad0411a4767b4a9bf (diff) | |
| parent | cfa2a2632ad5efc1cc099d661672042be8776500 (diff) | |
| download | rust-b43a6822597061dc18cbdde1769d9815e718d7bb.tar.gz rust-b43a6822597061dc18cbdde1769d9815e718d7bb.zip | |
Auto merge of #65759 - tmiasko:ui, r=petrochenkov
Validate error patterns and error annotation in ui tests when present Previously, when compilation succeeded, neither error patterns nor error annotation would be validated. Additionally, when compilation failed, only error patterns would be validated if both error patterns and error annotation were present. Now both error patterns and error annotation are validated when present, regardless of compilation status. Furthermore, for test that should run, the error patterns are matched against executable output, which is what some of tests already expect to happen, and when #65506 is merged even more ui tests will. Fixes #56277
Diffstat (limited to 'src/test/ui/pattern')
| -rw-r--r-- | src/test/ui/pattern/usefulness/issue-43253.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/ui/pattern/usefulness/issue-43253.rs b/src/test/ui/pattern/usefulness/issue-43253.rs index 5c6834459f0..349ba11a7cd 100644 --- a/src/test/ui/pattern/usefulness/issue-43253.rs +++ b/src/test/ui/pattern/usefulness/issue-43253.rs @@ -32,14 +32,14 @@ fn main() { match 10 { 1..10 => {}, - 8..=9 => {}, //~ WARNING multiple patterns covering the same range + 8..=9 => {}, //~ WARNING unreachable pattern _ => {}, } match 10 { 5..7 => {}, 6 => {}, //~ WARNING unreachable pattern - 1..10 => {}, //~ WARNING multiple patterns covering the same range + 1..10 => {}, 9..=9 => {}, //~ WARNING unreachable pattern 6 => {}, //~ WARNING unreachable pattern _ => {}, |
