diff options
| author | Joshua Nelson <jyn514@gmail.com> | 2021-02-28 13:24:46 -0500 |
|---|---|---|
| committer | Joshua Nelson <jyn514@gmail.com> | 2021-06-06 00:44:54 -0400 |
| commit | 1cdc81bdc109dab9a71108201a0e8edf24efeafa (patch) | |
| tree | 553d7ca320c09c6b0962769437e123d0f911292b /src/tools/compiletest | |
| parent | 34b9932f5c0f519d6b9b9f95f21723142c5dc877 (diff) | |
Don't pass -Z unstable-options by default for UI tests
- Pass it explicitly where appropriate - Update stderr files and warnings; it turns that unstable-options has far-reaching effects on diagnostics.
Diffstat (limited to 'src/tools/compiletest')
| -rw-r--r-- | src/tools/compiletest/src/header.rs | 3 | ||||
| -rw-r--r-- | src/tools/compiletest/src/runtest.rs | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index 983934d129a..19ea2157608 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -438,6 +438,9 @@ impl TestProps { if let Some(edition) = config.parse_edition(ln) { self.compile_flags.push(format!("--edition={}", edition)); + if edition == "2021" { + self.compile_flags.push("-Zunstable-options".to_string()); + } } config.parse_and_update_revisions(ln, &mut self.revisions); diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 54b079a3e86..e319de1ac1d 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -1785,6 +1785,9 @@ impl<'test> TestCx<'test> { get_lib_name(&aux_path.trim_end_matches(".rs").replace('-', "_"), is_dylib); rustc.arg("--extern").arg(format!("{}={}/{}", aux_name, aux_dir.display(), lib_name)); } + if !self.props.aux_crates.is_empty() { + rustc.arg("-Zunstable-options"); + } aux_dir } |
