about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorKlim Tsoutsman <32662194+tsoutsman@users.noreply.github.com>2021-08-08 13:17:23 +1000
committerGitHub <noreply@github.com>2021-08-08 13:17:23 +1000
commit26bf0ef0b5a70a70a6e0f85533bb3ca1404e9650 (patch)
tree064df89e6802b6fbd290957508e553da317c242a /src
parent75e80358d20d41ef148da32a1a5a4e29282181fc (diff)
parent798446fe0612dd83a151e99c201b87dd649d4eb3 (diff)
Merge branch 'rust-lang:master' into master
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/builder/tests.rs3
-rw-r--r--src/bootstrap/flags.rs10
-rw-r--r--src/bootstrap/test.rs4
-rw-r--r--src/librustdoc/clean/types.rs2
-rw-r--r--src/test/codegen/vec-shrink-panik.rs (renamed from src/test/codegen/vec-shrink-panic.rs)0
-rw-r--r--src/test/ui/asm/naked-functions.rs2
-rw-r--r--src/test/ui/asm/naked-functions.stderr20
-rw-r--r--src/tools/compiletest/src/common.rs3
-rw-r--r--src/tools/compiletest/src/main.rs19
-rw-r--r--src/tools/linkchecker/main.rs2
m---------src/tools/miri16
11 files changed, 50 insertions, 31 deletions
diff --git a/src/bootstrap/builder/tests.rs b/src/bootstrap/builder/tests.rs
index e7fb8c0d4d5..bb3ea04d4ac 100644
--- a/src/bootstrap/builder/tests.rs
+++ b/src/bootstrap/builder/tests.rs
@@ -486,6 +486,7 @@ mod dist {
             fail_fast: true,
             doc_tests: DocTests::No,
             bless: false,
+            force_rerun: false,
             compare_mode: None,
             rustfix_coverage: false,
             pass: None,
@@ -527,6 +528,7 @@ mod dist {
             fail_fast: true,
             doc_tests: DocTests::No,
             bless: false,
+            force_rerun: false,
             compare_mode: None,
             rustfix_coverage: false,
             pass: None,
@@ -583,6 +585,7 @@ mod dist {
             fail_fast: true,
             doc_tests: DocTests::Yes,
             bless: false,
+            force_rerun: false,
             compare_mode: None,
             rustfix_coverage: false,
             pass: None,
diff --git a/src/bootstrap/flags.rs b/src/bootstrap/flags.rs
index 1b7614b2989..7b74a909c28 100644
--- a/src/bootstrap/flags.rs
+++ b/src/bootstrap/flags.rs
@@ -102,6 +102,7 @@ pub enum Subcommand {
         paths: Vec<PathBuf>,
         /// Whether to automatically update stderr/stdout files
         bless: bool,
+        force_rerun: bool,
         compare_mode: Option<String>,
         pass: Option<String>,
         run: Option<String>,
@@ -284,6 +285,7 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`",
                 opts.optflag("", "no-doc", "do not run doc tests");
                 opts.optflag("", "doc", "only run doc tests");
                 opts.optflag("", "bless", "update all stderr/stdout files of failing ui tests");
+                opts.optflag("", "force-rerun", "rerun tests even if the inputs are unchanged");
                 opts.optopt(
                     "",
                     "compare-mode",
@@ -558,6 +560,7 @@ Arguments:
             "test" | "t" => Subcommand::Test {
                 paths,
                 bless: matches.opt_present("bless"),
+                force_rerun: matches.opt_present("force-rerun"),
                 compare_mode: matches.opt_str("compare-mode"),
                 pass: matches.opt_str("pass"),
                 run: matches.opt_str("run"),
@@ -726,6 +729,13 @@ impl Subcommand {
         }
     }
 
+    pub fn force_rerun(&self) -> bool {
+        match *self {
+            Subcommand::Test { force_rerun, .. } => force_rerun,
+            _ => false,
+        }
+    }
+
     pub fn rustfix_coverage(&self) -> bool {
         match *self {
             Subcommand::Test { rustfix_coverage, .. } => rustfix_coverage,
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index 31f18d81c7c..9effdb2c959 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -1315,6 +1315,10 @@ note: if you're sure you want to do this, please open an issue as to why. In the
             cmd.arg("--bless");
         }
 
+        if builder.config.cmd.force_rerun() {
+            cmd.arg("--force-rerun");
+        }
+
         let compare_mode =
             builder.config.cmd.compare_mode().or_else(|| {
                 if builder.config.test_compare_mode { self.compare_mode } else { None }
diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs
index 22e4d21c87b..af42a4cd06d 100644
--- a/src/librustdoc/clean/types.rs
+++ b/src/librustdoc/clean/types.rs
@@ -1937,7 +1937,7 @@ crate enum Variant {
     Struct(VariantStruct),
 }
 
-/// Small wrapper around [`rustc_span::Span]` that adds helper methods
+/// Small wrapper around [`rustc_span::Span`] that adds helper methods
 /// and enforces calling [`rustc_span::Span::source_callsite()`].
 #[derive(Copy, Clone, Debug)]
 crate struct Span(rustc_span::Span);
diff --git a/src/test/codegen/vec-shrink-panic.rs b/src/test/codegen/vec-shrink-panik.rs
index 6b0ac78857a..6b0ac78857a 100644
--- a/src/test/codegen/vec-shrink-panic.rs
+++ b/src/test/codegen/vec-shrink-panik.rs
diff --git a/src/test/ui/asm/naked-functions.rs b/src/test/ui/asm/naked-functions.rs
index 7075995c2cf..900f4443a1f 100644
--- a/src/test/ui/asm/naked-functions.rs
+++ b/src/test/ui/asm/naked-functions.rs
@@ -134,14 +134,12 @@ unsafe extern "C" fn invalid_options_continued() {
 #[naked]
 pub unsafe fn default_abi() {
     //~^ WARN Rust ABI is unsupported in naked functions
-    //~| WARN this was previously accepted
     asm!("", options(noreturn));
 }
 
 #[naked]
 pub unsafe extern "Rust" fn rust_abi() {
     //~^ WARN Rust ABI is unsupported in naked functions
-    //~| WARN this was previously accepted
     asm!("", options(noreturn));
 }
 
diff --git a/src/test/ui/asm/naked-functions.stderr b/src/test/ui/asm/naked-functions.stderr
index 2a186a69ff4..231a6239cbd 100644
--- a/src/test/ui/asm/naked-functions.stderr
+++ b/src/test/ui/asm/naked-functions.stderr
@@ -284,20 +284,16 @@ warning: Rust ABI is unsupported in naked functions
 LL | pub unsafe fn default_abi() {
    |               ^^^^^^^^^^^
    |
-   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
-   = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
+   = note: `#[warn(undefined_naked_function_abi)]` on by default
 
 warning: Rust ABI is unsupported in naked functions
-  --> $DIR/naked-functions.rs:142:29
+  --> $DIR/naked-functions.rs:141:29
    |
 LL | pub unsafe extern "Rust" fn rust_abi() {
    |                             ^^^^^^^^
-   |
-   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
-   = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 warning: naked functions cannot be inlined
-  --> $DIR/naked-functions.rs:177:1
+  --> $DIR/naked-functions.rs:175:1
    |
 LL | #[inline]
    | ^^^^^^^^^
@@ -306,7 +302,7 @@ LL | #[inline]
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 warning: naked functions cannot be inlined
-  --> $DIR/naked-functions.rs:185:1
+  --> $DIR/naked-functions.rs:183:1
    |
 LL | #[inline(always)]
    | ^^^^^^^^^^^^^^^^^
@@ -315,7 +311,7 @@ LL | #[inline(always)]
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 warning: naked functions cannot be inlined
-  --> $DIR/naked-functions.rs:193:1
+  --> $DIR/naked-functions.rs:191:1
    |
 LL | #[inline(never)]
    | ^^^^^^^^^^^^^^^^
@@ -324,7 +320,7 @@ LL | #[inline(never)]
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 warning: naked functions cannot be inlined
-  --> $DIR/naked-functions.rs:201:1
+  --> $DIR/naked-functions.rs:199:1
    |
 LL | #[inline]
    | ^^^^^^^^^
@@ -333,7 +329,7 @@ LL | #[inline]
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 warning: naked functions cannot be inlined
-  --> $DIR/naked-functions.rs:204:1
+  --> $DIR/naked-functions.rs:202:1
    |
 LL | #[inline(always)]
    | ^^^^^^^^^^^^^^^^^
@@ -342,7 +338,7 @@ LL | #[inline(always)]
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 warning: naked functions cannot be inlined
-  --> $DIR/naked-functions.rs:207:1
+  --> $DIR/naked-functions.rs:205:1
    |
 LL | #[inline(never)]
    | ^^^^^^^^^^^^^^^^
diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs
index a5b526be86f..99b0a3454e8 100644
--- a/src/tools/compiletest/src/common.rs
+++ b/src/tools/compiletest/src/common.rs
@@ -362,6 +362,9 @@ pub struct Config {
     pub nodejs: Option<String>,
     /// Path to a npm executable. Used for rustdoc GUI tests
     pub npm: Option<String>,
+
+    /// Whether to rerun tests even if the inputs are unchanged.
+    pub force_rerun: bool,
 }
 
 impl Config {
diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs
index 46432d5e4f5..9e655557fd2 100644
--- a/src/tools/compiletest/src/main.rs
+++ b/src/tools/compiletest/src/main.rs
@@ -144,6 +144,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
             "enable this to generate a Rustfix coverage file, which is saved in \
                 `./<build_base>/rustfix_missing_coverage.txt`",
         )
+        .optflag("", "force-rerun", "rerun tests even if the inputs are unchanged")
         .optflag("h", "help", "show this message")
         .reqopt("", "channel", "current Rust channel", "CHANNEL");
 
@@ -289,6 +290,8 @@ pub fn parse_config(args: Vec<String>) -> Config {
         llvm_components: matches.opt_str("llvm-components").unwrap(),
         nodejs: matches.opt_str("nodejs"),
         npm: matches.opt_str("npm"),
+
+        force_rerun: matches.opt_present("force-rerun"),
     }
 }
 
@@ -644,13 +647,15 @@ fn make_test(config: &Config, testpaths: &TestPaths, inputs: &Stamp) -> Vec<test
             let test_name = crate::make_test_name(config, testpaths, revision);
             let mut desc = make_test_description(config, test_name, &test_path, src_file, cfg);
             // Ignore tests that already run and are up to date with respect to inputs.
-            desc.ignore |= is_up_to_date(
-                config,
-                testpaths,
-                &early_props,
-                revision.map(|s| s.as_str()),
-                inputs,
-            );
+            if !config.force_rerun {
+                desc.ignore |= is_up_to_date(
+                    config,
+                    testpaths,
+                    &early_props,
+                    revision.map(|s| s.as_str()),
+                    inputs,
+                );
+            }
             test::TestDescAndFn { desc, testfn: make_test_closure(config, testpaths, revision) }
         })
         .collect()
diff --git a/src/tools/linkchecker/main.rs b/src/tools/linkchecker/main.rs
index 15edd628cdf..8cbe0a0c2e8 100644
--- a/src/tools/linkchecker/main.rs
+++ b/src/tools/linkchecker/main.rs
@@ -129,7 +129,7 @@ enum FileEntry {
     /// An HTML file.
     ///
     /// This includes the contents of the HTML file, and an optional set of
-    /// HTML IDs. The IDs are used for checking fragments. The are computed
+    /// HTML IDs. The IDs are used for checking fragments. They are computed
     /// as-needed. The source is discarded (replaced with an empty string)
     /// after the file has been checked, to conserve on memory.
     HtmlFile { source: Rc<String>, ids: RefCell<HashSet<String>> },
diff --git a/src/tools/miri b/src/tools/miri
-Subproject 99ec9c1707aad74b4a4a6d301f27fb1c19733f5
+Subproject 042cbf175bfdad6524fd00d7570b2297a042606