diff options
| author | Tyler Lanphear <animemachine13@gmail.com> | 2020-02-02 01:05:53 -0500 |
|---|---|---|
| committer | Tyler Lanphear <animemachine13@gmail.com> | 2020-02-02 02:08:30 -0500 |
| commit | f6c389472448257a91c2f6713061cd69025c766f (patch) | |
| tree | c140bb76116ea822b2ca342385e4d953c42374a7 /src/tools/compiletest | |
| parent | e5b150edafc0e72cd7f5f3f67a4e8b417d515b01 (diff) | |
| download | rust-f6c389472448257a91c2f6713061cd69025c766f.tar.gz rust-f6c389472448257a91c2f6713061cd69025c766f.zip | |
compiletest: error if `compile-fail` header in ui test.
Diffstat (limited to 'src/tools/compiletest')
| -rw-r--r-- | src/tools/compiletest/src/header.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index 817705c0bd6..555e79d3e06 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -554,6 +554,9 @@ impl TestProps { panic!("`{}-fail` header is only supported in UI tests", mode); } }; + if config.mode == Mode::Ui && config.parse_name_directive(ln, "compile-fail") { + panic!("`compile-fail` header is useless in UI tests"); + } let fail_mode = if config.parse_name_directive(ln, "check-fail") { check_ui("check"); Some(FailMode::Check) |
