Remove the -test suffix from normalize directives

This commit is contained in:
Zalathar 2024-12-25 22:12:17 +11:00
parent 5ba0dd4ef6
commit 835fbcbcab
238 changed files with 442 additions and 443 deletions

View file

@ -160,10 +160,10 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
"needs-xray", "needs-xray",
"no-auto-check-cfg", "no-auto-check-cfg",
"no-prefer-dynamic", "no-prefer-dynamic",
"normalize-stderr",
"normalize-stderr-32bit", "normalize-stderr-32bit",
"normalize-stderr-64bit", "normalize-stderr-64bit",
"normalize-stderr-test", "normalize-stdout",
"normalize-stdout-test",
"only-16bit", "only-16bit",
"only-32bit", "only-32bit",
"only-64bit", "only-64bit",

View file

@ -984,8 +984,8 @@ impl Config {
let (directive_name, _value) = line.split_once(':')?; let (directive_name, _value) = line.split_once(':')?;
let kind = match directive_name { let kind = match directive_name {
"normalize-stdout-test" => NormalizeKind::Stdout, "normalize-stdout" => NormalizeKind::Stdout,
"normalize-stderr-test" => NormalizeKind::Stderr, "normalize-stderr" => NormalizeKind::Stderr,
"normalize-stderr-32bit" => NormalizeKind::Stderr32bit, "normalize-stderr-32bit" => NormalizeKind::Stderr32bit,
"normalize-stderr-64bit" => NormalizeKind::Stderr64bit, "normalize-stderr-64bit" => NormalizeKind::Stderr64bit,
_ => return None, _ => return None,

View file

@ -69,8 +69,7 @@ const ANNOTATIONS_TO_IGNORE: &[&str] = &[
"// gdb", "// gdb",
"// lldb", "// lldb",
"// cdb", "// cdb",
"// normalize-stderr-test", "//@ normalize-stderr",
"//@ normalize-stderr-test",
]; ];
fn generate_problems<'a>( fn generate_problems<'a>(
@ -198,8 +197,8 @@ fn should_ignore(line: &str) -> bool {
// For `ui_test`-style UI test directives, also ignore // For `ui_test`-style UI test directives, also ignore
// - `//@[rev] compile-flags` // - `//@[rev] compile-flags`
// - `//@[rev] normalize-stderr-test` // - `//@[rev] normalize-stderr`
|| static_regex!("\\s*//@(\\[.*\\]) (compile-flags|normalize-stderr-test|error-pattern).*") || static_regex!("\\s*//@(\\[.*\\]) (compile-flags|normalize-stderr|error-pattern).*")
.is_match(line) .is_match(line)
// Matching for rustdoc tests commands. // Matching for rustdoc tests commands.
// It allows to prevent them emitting warnings like `line longer than 100 chars`. // It allows to prevent them emitting warnings like `line longer than 100 chars`.

View file

@ -1,9 +1,9 @@
//@ check-pass //@ check-pass
//@ edition: 2024 //@ edition: 2024
//@ compile-flags: --test --test-args=--test-threads=1 //@ compile-flags: --test --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL" //@ normalize-stdout: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
/// ``` /// ```
/// let x = 12; /// let x = 12;

View file

@ -1,9 +1,9 @@
//@ check-pass //@ check-pass
//@ edition: 2024 //@ edition: 2024
//@ compile-flags: --test --test-args=--test-threads=1 //@ compile-flags: --test --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL" //@ normalize-stdout: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
/// This doctest is used to ensure that if a crate attribute is present, /// This doctest is used to ensure that if a crate attribute is present,
/// it will not be part of the merged doctests. /// it will not be part of the merged doctests.

View file

@ -5,8 +5,8 @@
// line arguments and is only run on windows. // line arguments and is only run on windows.
// //
//@ only-windows //@ only-windows
//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR" //@ normalize-stderr: "os error \d+" -> "os error $$ERR"
//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " //@ normalize-stderr: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING "
//@ compile-flags: --cfg cmdline_set @{{src-base}}\argfile\commandline-argfile-missing.args //@ compile-flags: --cfg cmdline_set @{{src-base}}\argfile\commandline-argfile-missing.args
#[cfg(not(cmdline_set))] #[cfg(not(cmdline_set))]

View file

@ -6,8 +6,8 @@
// windows. // windows.
// //
//@ ignore-windows //@ ignore-windows
//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR" //@ normalize-stderr: "os error \d+" -> "os error $$ERR"
//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " //@ normalize-stderr: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING "
//@ compile-flags: --cfg cmdline_set @{{src-base}}/argfile/commandline-argfile-missing.args //@ compile-flags: --cfg cmdline_set @{{src-base}}/argfile/commandline-argfile-missing.args
#[cfg(not(cmdline_set))] #[cfg(not(cmdline_set))]

View file

@ -5,9 +5,9 @@
// line arguments and is only run on windows. // line arguments and is only run on windows.
// //
//@ only-windows //@ only-windows
//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR" //@ normalize-stderr: "os error \d+" -> "os error $$ERR"
//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " //@ normalize-stderr: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING "
//@ normalize-stderr-test: "commandline-argfile-missing2.args:[^(]*" -> "commandline-argfile-missing2.args: $$FILE_MISSING " //@ normalize-stderr: "commandline-argfile-missing2.args:[^(]*" -> "commandline-argfile-missing2.args: $$FILE_MISSING "
//@ compile-flags: --cfg cmdline_set @{{src-base}}\argfile\commandline-argfile-missing.args @{{src-base}}\argfile\commandline-argfile-badutf8.args @{{src-base}}\argfile\commandline-argfile-missing2.args //@ compile-flags: --cfg cmdline_set @{{src-base}}\argfile\commandline-argfile-missing.args @{{src-base}}\argfile\commandline-argfile-badutf8.args @{{src-base}}\argfile\commandline-argfile-missing2.args
#[cfg(not(cmdline_set))] #[cfg(not(cmdline_set))]

View file

@ -6,9 +6,9 @@
// windows. // windows.
// //
//@ ignore-windows //@ ignore-windows
//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR" //@ normalize-stderr: "os error \d+" -> "os error $$ERR"
//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " //@ normalize-stderr: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING "
//@ normalize-stderr-test: "commandline-argfile-missing2.args:[^(]*" -> "commandline-argfile-missing2.args: $$FILE_MISSING " //@ normalize-stderr: "commandline-argfile-missing2.args:[^(]*" -> "commandline-argfile-missing2.args: $$FILE_MISSING "
//@ compile-flags: --cfg cmdline_set @{{src-base}}/argfile/commandline-argfile-missing.args @{{src-base}}/argfile/commandline-argfile-badutf8.args @{{src-base}}/argfile/commandline-argfile-missing2.args //@ compile-flags: --cfg cmdline_set @{{src-base}}/argfile/commandline-argfile-missing.args @{{src-base}}/argfile/commandline-argfile-badutf8.args @{{src-base}}/argfile/commandline-argfile-missing2.args
#[cfg(not(cmdline_set))] #[cfg(not(cmdline_set))]

View file

@ -1,5 +1,5 @@
//@ check-pass //@ check-pass
//@ normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" //@ normalize-stderr: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL"
//! [struct@m!()] //~ WARN: unmatched disambiguator `struct` and suffix `!()` //! [struct@m!()] //~ WARN: unmatched disambiguator `struct` and suffix `!()`
//! [struct@m!{}] //! [struct@m!{}]

View file

@ -1,6 +1,6 @@
//@ check-pass //@ check-pass
//@ compile-flags:--test //@ compile-flags:--test
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
// This test ensures that no code block is detected in the doc comments. // This test ensures that no code block is detected in the doc comments.

View file

@ -1,7 +1,7 @@
//@ check-pass //@ check-pass
//@ compile-flags:--test --test-args --test-threads=1 //@ compile-flags:--test --test-args --test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
// Crates like core have doctests gated on `cfg(not(test))` so we need to make // Crates like core have doctests gated on `cfg(not(test))` so we need to make
// sure `cfg(test)` is not active when running `rustdoc --test`. // sure `cfg(test)` is not active when running `rustdoc --test`.

View file

@ -1,8 +1,8 @@
//@ check-pass //@ check-pass
//@ compile-flags: --test --nocapture --check-cfg=cfg(feature,values("test")) -Z unstable-options //@ compile-flags: --test --nocapture --check-cfg=cfg(feature,values("test")) -Z unstable-options
//@ normalize-stderr-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stderr: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
/// The doctest will produce a warning because feature invalid is unexpected /// The doctest will produce a warning because feature invalid is unexpected
/// ``` /// ```

View file

@ -1,8 +1,8 @@
//@ compile-flags:--test --test-args --test-threads=1 //@ compile-flags:--test --test-args --test-threads=1
//@ failure-status: 101 //@ failure-status: 101
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL" //@ normalize-stdout: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
//! ``` //! ```
#![doc = "#![all\ #![doc = "#![all\

View file

@ -4,9 +4,9 @@
//@ compile-flags:--test --test-args --test-threads=1 //@ compile-flags:--test --test-args --test-threads=1
//@ failure-status: 101 //@ failure-status: 101
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL" //@ normalize-stdout: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
/*! /*!
```rust ```rust

View file

@ -2,8 +2,8 @@
//@ edition: 2024 //@ edition: 2024
//@ compile-flags:--test //@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101 //@ failure-status: 101
#![doc(test(attr(allow(unused_variables), deny(warnings))))] #![doc(test(attr(allow(unused_variables), deny(warnings))))]

View file

@ -1,8 +1,8 @@
// This test ensures that the doctest will not use `#[allow(unused)]`. // This test ensures that the doctest will not use `#[allow(unused)]`.
//@ compile-flags:--test //@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101 //@ failure-status: 101
#![doc(test(attr(allow(unused_variables), deny(warnings))))] #![doc(test(attr(allow(unused_variables), deny(warnings))))]

View file

@ -3,8 +3,8 @@
//@ check-pass //@ check-pass
//@ edition:2018 //@ edition:2018
//@ compile-flags:--test --test-args=--show-output //@ compile-flags:--test --test-args=--show-output
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
/// ``` /// ```
/// #![warn(unused)] /// #![warn(unused)]

View file

@ -1,7 +1,7 @@
// Regression test for #97440: Multiline inner attribute triggers ICE during doctest // Regression test for #97440: Multiline inner attribute triggers ICE during doctest
//@ compile-flags:--test //@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ check-pass //@ check-pass
//! ```rust //! ```rust

View file

@ -1,6 +1,6 @@
//@ compile-flags:--test //@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ check-pass //@ check-pass
/// ``` /// ```

View file

@ -1,7 +1,7 @@
//@ check-pass //@ check-pass
//@ compile-flags:--test //@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
// Make sure `cfg(doctest)` is set when finding doctests but not inside // Make sure `cfg(doctest)` is set when finding doctests but not inside
// the doctests. // the doctests.

View file

@ -1,7 +1,7 @@
//@ check-pass //@ check-pass
//@ compile-flags:--test //@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
#![feature(doc_cfg)] #![feature(doc_cfg)]

View file

@ -1,6 +1,6 @@
//@ compile-flags:--test --test-args=--test-threads=1 //@ compile-flags:--test --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ check-pass //@ check-pass
/// ``` /// ```

View file

@ -1,7 +1,7 @@
//@ edition:2024 //@ edition:2024
//@ compile-flags:--test --test-args=--test-threads=1 //@ compile-flags:--test --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101 //@ failure-status: 101
// https://github.com/rust-lang/rust/issues/130470 // https://github.com/rust-lang/rust/issues/130470

View file

@ -5,8 +5,8 @@
//@[edition2024]edition:2015 //@[edition2024]edition:2015
//@[edition2024]aux-build:extern_macros.rs //@[edition2024]aux-build:extern_macros.rs
//@[edition2024]compile-flags:--test --test-args=--test-threads=1 //@[edition2024]compile-flags:--test --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ check-pass //@ check-pass
//! ``` //! ```

View file

@ -2,8 +2,8 @@
// adapted to use that, and that normalize line can go away // adapted to use that, and that normalize line can go away
//@ compile-flags:--test //@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101 //@ failure-status: 101
/// ```compile_fail /// ```compile_fail

View file

@ -2,8 +2,8 @@
// adapted to use that, and that normalize line can go away // adapted to use that, and that normalize line can go away
//@ compile-flags:--test //@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101 //@ failure-status: 101
/// <https://github.com/rust-lang/rust/issues/91014> /// <https://github.com/rust-lang/rust/issues/91014>

View file

@ -2,8 +2,8 @@
// adapted to use that, and that normalize line can go away // adapted to use that, and that normalize line can go away
//@ compile-flags:--test //@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101 //@ failure-status: 101
/// ```compile_fail,E0004 /// ```compile_fail,E0004

View file

@ -7,8 +7,8 @@
//@ compile-flags:--test --test-args --test-threads=1 //@ compile-flags:--test --test-args --test-threads=1
//@ rustc-env:RUST_BACKTRACE=0 //@ rustc-env:RUST_BACKTRACE=0
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101 //@ failure-status: 101
// doctest fails at runtime // doctest fails at runtime

View file

@ -7,8 +7,8 @@
//@ compile-flags:--test --test-args --test-threads=1 //@ compile-flags:--test --test-args --test-threads=1
//@ rustc-env:RUST_BACKTRACE=0 //@ rustc-env:RUST_BACKTRACE=0
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101 //@ failure-status: 101
// doctest fails at runtime // doctest fails at runtime

View file

@ -2,8 +2,8 @@
// adapted to use that, and that normalize line can go away // adapted to use that, and that normalize line can go away
//@ compile-flags:--test --edition 2021 //@ compile-flags:--test --edition 2021
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101 //@ failure-status: 101
/// ```should_panic /// ```should_panic

View file

@ -3,8 +3,8 @@
//@ edition: 2024 //@ edition: 2024
//@ compile-flags:--test //@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101 //@ failure-status: 101
/// ```should_panic /// ```should_panic

View file

@ -1,7 +1,7 @@
//@ edition: 2024 //@ edition: 2024
//@ compile-flags:--test --test-args=--test-threads=1 //@ compile-flags:--test --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ check-pass //@ check-pass
/// ```ignore (test) /// ```ignore (test)

View file

@ -1,7 +1,7 @@
//@ check-pass //@ check-pass
//@ compile-flags:--test --test-args=--test-threads=1 //@ compile-flags:--test --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
// Regression test for <https://github.com/rust-lang/rust/issues/131893>. // Regression test for <https://github.com/rust-lang/rust/issues/131893>.
// It ensures that if a function called `main` is nested, it will not consider // It ensures that if a function called `main` is nested, it will not consider

View file

@ -2,8 +2,8 @@
//@ check-pass //@ check-pass
//@ compile-flags:-Z unstable-options --test --no-run --test-args=--test-threads=1 //@ compile-flags:-Z unstable-options --test --no-run --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
/// ``` /// ```
/// let a = true; /// let a = true;

View file

@ -1,8 +1,8 @@
//@ check-pass //@ check-pass
//@ compile-flags:--test -Zunstable-options --nocapture //@ compile-flags:--test -Zunstable-options --nocapture
//@ normalize-stderr-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stderr: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
/// ```compile_fail /// ```compile_fail
/// fn foo() { /// fn foo() {

View file

@ -1,7 +1,7 @@
//@ check-pass //@ check-pass
//@ compile-flags:--test -Zunstable-options --nocapture //@ compile-flags:--test -Zunstable-options --nocapture
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
/// ``` /// ```
/// println!("hello!"); /// println!("hello!");

View file

@ -3,8 +3,8 @@
//@ failure-status: 101 //@ failure-status: 101
//@ aux-build:pub_trait.rs //@ aux-build:pub_trait.rs
//@ compile-flags: --test --test-args --test-threads=1 //@ compile-flags: --test --test-args --test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
#![doc(test(attr(deny(non_local_definitions))))] #![doc(test(attr(deny(non_local_definitions))))]
#![doc(test(attr(allow(dead_code))))] #![doc(test(attr(allow(dead_code))))]

View file

@ -1,8 +1,8 @@
//@ check-pass //@ check-pass
//@ compile-flags:--test --test-args --test-threads=1 --nocapture -Zunstable-options //@ compile-flags:--test --test-args --test-threads=1 --nocapture -Zunstable-options
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stderr-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stderr: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//! ``` //! ```
//! #[macro_export] //! #[macro_export]

View file

@ -7,8 +7,8 @@
//@[edition2024]edition:2024 //@[edition2024]edition:2024
//@[edition2024]check-pass //@[edition2024]check-pass
//@[edition2024]compile-flags:--test --test-args=--test-threads=1 //@[edition2024]compile-flags:--test --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
// https://github.com/rust-lang/rust/issues/132203 // https://github.com/rust-lang/rust/issues/132203
// This version, because it's edition2024, passes thanks to the new // This version, because it's edition2024, passes thanks to the new

View file

@ -4,8 +4,8 @@
//@ check-pass //@ check-pass
//@ [correct]compile-flags:--test --test-run-directory={{src-base}} //@ [correct]compile-flags:--test --test-run-directory={{src-base}}
//@ [incorrect]compile-flags:--test --test-run-directory={{src-base}}/coverage //@ [incorrect]compile-flags:--test --test-run-directory={{src-base}}/coverage
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
/// ``` /// ```
/// assert_eq!( /// assert_eq!(

View file

@ -4,8 +4,8 @@
//@ check-pass //@ check-pass
//@ compile-flags: --test -Zunstable-options --doctest-compilation-args=--cfg=testcase_must_be_present //@ compile-flags: --test -Zunstable-options --doctest-compilation-args=--cfg=testcase_must_be_present
//@ compile-flags: --doctest-compilation-args=--cfg=another //@ compile-flags: --doctest-compilation-args=--cfg=another
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
/// ``` /// ```
/// #[cfg(testcase_must_be_present)] /// #[cfg(testcase_must_be_present)]

View file

@ -1,7 +1,7 @@
//@ check-pass //@ check-pass
//@ compile-flags: --test -Zunstable-options --doctest-compilation-args=--cfg=testcase_must_be_present //@ compile-flags: --test -Zunstable-options --doctest-compilation-args=--cfg=testcase_must_be_present
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
/// ``` /// ```
/// #[cfg(testcase_must_be_present)] /// #[cfg(testcase_must_be_present)]

View file

@ -2,9 +2,9 @@
//@ edition: 2024 //@ edition: 2024
//@ compile-flags:--test //@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL" //@ normalize-stdout: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
#![deny(warnings)] #![deny(warnings)]

View file

@ -1,6 +1,6 @@
//@ compile-flags:--test //@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ check-pass //@ check-pass
#![no_std] #![no_std]

View file

@ -1,7 +1,7 @@
//@ compile-flags: --test --test-args=--test-threads=1 //@ compile-flags: --test --test-args=--test-threads=1
//@ check-pass //@ check-pass
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
/// ``` /// ```
/// let a = true; /// let a = true;

View file

@ -1,6 +1,6 @@
//@ compile-flags: --test //@ compile-flags: --test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101 //@ failure-status: 101
//@ rustc-env: RUST_BACKTRACE=0 //@ rustc-env: RUST_BACKTRACE=0

View file

@ -1,8 +1,8 @@
//@ edition: 2024 //@ edition: 2024
//@ compile-flags:--test --test-args=--test-threads=1 //@ compile-flags:--test --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL" //@ normalize-stdout: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
//@ failure-status: 101 //@ failure-status: 101
/// ``` /// ```

View file

@ -1,6 +1,6 @@
//@ compile-flags:--test --test-args=--test-threads=1 //@ compile-flags:--test --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101 //@ failure-status: 101
/// ``` /// ```

View file

@ -1,5 +1,5 @@
//@ normalize-stderr-test: "`.*`" -> "`DEF_ID`" //@ normalize-stderr: "`.*`" -> "`DEF_ID`"
//@ normalize-stdout-test: "`.*`" -> "`DEF_ID`" //@ normalize-stdout: "`.*`" -> "`DEF_ID`"
//@ edition:2018 //@ edition:2018
pub async fn f() -> impl std::fmt::Debug { pub async fn f() -> impl std::fmt::Debug {

View file

@ -4,12 +4,12 @@
//@ error-pattern: aborting due to //@ error-pattern: aborting due to
//@ error-pattern: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-rustdoc&template=ice.md //@ error-pattern: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-rustdoc&template=ice.md
//@ normalize-stderr-test: "note: compiler flags.*\n\n" -> "" //@ normalize-stderr: "note: compiler flags.*\n\n" -> ""
//@ normalize-stderr-test: "note: rustc.*running on.*" -> "note: rustc {version} running on {platform}" //@ normalize-stderr: "note: rustc.*running on.*" -> "note: rustc {version} running on {platform}"
//@ normalize-stderr-test: "thread.*panicked at compiler.*" -> "" //@ normalize-stderr: "thread.*panicked at compiler.*" -> ""
//@ normalize-stderr-test: " +\d{1,}: .*\n" -> "" //@ normalize-stderr: " +\d{1,}: .*\n" -> ""
//@ normalize-stderr-test: " + at .*\n" -> "" //@ normalize-stderr: " + at .*\n" -> ""
//@ normalize-stderr-test: ".*note: Some details are omitted.*\n" -> "" //@ normalize-stderr: ".*note: Some details are omitted.*\n" -> ""
fn wrong() fn wrong()
//~^ ERROR expected one of //~^ ERROR expected one of

View file

@ -1,4 +1,4 @@
//@ normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" //@ normalize-stderr: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL"
//@ check-pass //@ check-pass
#![deny(warnings)] #![deny(warnings)]

View file

@ -1,4 +1,4 @@
//@ normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" //@ normalize-stderr: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL"
#![deny(warnings)] #![deny(warnings)]
//! Linking to [foo@banana] and [`bar@banana!()`]. //! Linking to [foo@banana] and [`bar@banana!()`].

View file

@ -1,7 +1,7 @@
//@ check-pass //@ check-pass
//@ compile-flags:--test //@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/issues" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
pub fn test() -> Result<(), ()> { pub fn test() -> Result<(), ()> {
//! ```compile_fail //! ```compile_fail

View file

@ -1,8 +1,8 @@
//@ compile-flags:--test --error-format=short //@ compile-flags:--test --error-format=short
//@ check-stdout //@ check-stdout
//@ error-pattern:cannot find function `foo` //@ error-pattern:cannot find function `foo`
//@ normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/issues" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101 //@ failure-status: 101
/// ```rust /// ```rust

View file

@ -6,5 +6,5 @@
// //
// ignore-tidy-linelength // ignore-tidy-linelength
// //
//@ normalize-stdout-test: "( +name default meaning\n +---- ------- -------\n)?( *[[:word:]:-]+ (allow |warn |deny |forbid ) [^\n]+\n)+" -> " $$NAMES $$LEVELS $$MEANINGS" //@ normalize-stdout: "( +name default meaning\n +---- ------- -------\n)?( *[[:word:]:-]+ (allow |warn |deny |forbid ) [^\n]+\n)+" -> " $$NAMES $$LEVELS $$MEANINGS"
//@ normalize-stdout-test: " +name sub-lints\n +---- ---------\n( *[[:word:]:-]+ [^\n]+\n)+" -> " $$NAMES $$SUB_LINTS" //@ normalize-stdout: " +name sub-lints\n +---- ---------\n( *[[:word:]:-]+ [^\n]+\n)+" -> " $$NAMES $$SUB_LINTS"

View file

@ -1,8 +1,8 @@
//@ compile-flags: --test --crate-name=empty_fn --extern=empty_fn --test-args=--test-threads=1 //@ compile-flags: --test --crate-name=empty_fn --extern=empty_fn --test-args=--test-threads=1
//@ aux-build:empty-fn.rs //@ aux-build:empty-fn.rs
//@ check-pass //@ check-pass
//@ normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR" //@ normalize-stdout: "tests/rustdoc-ui/issues" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ edition:2021 //@ edition:2021
/// <https://github.com/rust-lang/rust/issues/91134> /// <https://github.com/rust-lang/rust/issues/91134>

View file

@ -1,6 +1,6 @@
//@ check-pass //@ check-pass
//@ compile-flags: -Z unstable-options --check //@ compile-flags: -Z unstable-options --check
//@ normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" //@ normalize-stderr: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL"
#![feature(rustdoc_missing_doc_code_examples)] #![feature(rustdoc_missing_doc_code_examples)]
//~^ WARN //~^ WARN

View file

@ -1,5 +1,5 @@
//@ error-pattern: no documentation found //@ error-pattern: no documentation found
//@ normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" //@ normalize-stderr: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL"
#![deny(rustdoc::missing_crate_level_docs)] #![deny(rustdoc::missing_crate_level_docs)]
//^~ NOTE defined here //^~ NOTE defined here

View file

@ -4,8 +4,8 @@
//@ failure-status: 101 //@ failure-status: 101
//@ compile-flags:--test -Z unstable-options --remap-path-prefix={{src-base}}=remapped_path --test-args --test-threads=1 //@ compile-flags:--test -Z unstable-options --remap-path-prefix={{src-base}}=remapped_path --test-args --test-threads=1
//@ rustc-env:RUST_BACKTRACE=0 //@ rustc-env:RUST_BACKTRACE=0
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "exit (status|code): 101" -> "exit status: 101" //@ normalize-stdout: "exit (status|code): 101" -> "exit status: 101"
// doctest fails at runtime // doctest fails at runtime
/// ``` /// ```

View file

@ -4,7 +4,7 @@
//@ failure-status: 101 //@ failure-status: 101
//@ compile-flags:--test -Z unstable-options --remap-path-prefix={{src-base}}=remapped_path --test-args --test-threads=1 //@ compile-flags:--test -Z unstable-options --remap-path-prefix={{src-base}}=remapped_path --test-args --test-threads=1
//@ rustc-env:RUST_BACKTRACE=0 //@ rustc-env:RUST_BACKTRACE=0
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
// doctest fails to compile // doctest fails to compile
/// ``` /// ```

View file

@ -5,7 +5,7 @@
// adapted to use that, and that normalize line can go away // adapted to use that, and that normalize line can go away
//@ compile-flags:--test -Z unstable-options --remap-path-prefix={{src-base}}=remapped_path --test-args --test-threads=1 //@ compile-flags:--test -Z unstable-options --remap-path-prefix={{src-base}}=remapped_path --test-args --test-threads=1
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
// doctest passes at runtime // doctest passes at runtime
/// ``` /// ```

View file

@ -3,7 +3,7 @@
// Normalize the emitted location so this doesn't need // Normalize the emitted location so this doesn't need
// updating everytime someone adds or removes a line. // updating everytime someone adds or removes a line.
//@ normalize-stderr-test: ".rs:\d+:\d+" -> ".rs:LL:CC" //@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:CC"
struct A; struct A;
struct B; struct B;

View file

@ -3,8 +3,8 @@
//@ ignore-stage1 (requires matching sysroot built with in-tree compiler) //@ ignore-stage1 (requires matching sysroot built with in-tree compiler)
//@ aux-codegen-backend: the_backend.rs //@ aux-codegen-backend: the_backend.rs
//@ normalize-stdout-test: "libthe_backend.dylib" -> "libthe_backend.so" //@ normalize-stdout: "libthe_backend.dylib" -> "libthe_backend.so"
//@ normalize-stdout-test: "the_backend.dll" -> "libthe_backend.so" //@ normalize-stdout: "the_backend.dll" -> "libthe_backend.so"
//@ revisions: normal dep bindep //@ revisions: normal dep bindep
//@ compile-flags: --crate-type=lib //@ compile-flags: --crate-type=lib

View file

@ -1,4 +1,4 @@
//@ normalize-stderr-test: "could not open Fluent resource:.*" -> "could not open Fluent resource: os-specific message" //@ normalize-stderr: "could not open Fluent resource:.*" -> "could not open Fluent resource: os-specific message"
#![feature(rustc_private)] #![feature(rustc_private)]
#![crate_type = "lib"] #![crate_type = "lib"]

View file

@ -1,8 +1,8 @@
// Test that we get the following hint when trying to use a compiler crate without rustc_driver. // Test that we get the following hint when trying to use a compiler crate without rustc_driver.
//@ error-pattern: try adding `extern crate rustc_driver;` at the top level of this crate //@ error-pattern: try adding `extern crate rustc_driver;` at the top level of this crate
//@ compile-flags: --emit link //@ compile-flags: --emit link
//@ normalize-stderr-test: ".*crate .* required.*\n\n" -> "" //@ normalize-stderr: ".*crate .* required.*\n\n" -> ""
//@ normalize-stderr-test: "aborting due to [0-9]+" -> "aborting due to NUMBER" //@ normalize-stderr: "aborting due to [0-9]+" -> "aborting due to NUMBER"
#![feature(rustc_private)] #![feature(rustc_private)]

View file

@ -1,7 +1,7 @@
//@ check-fail //@ check-fail
// Tests that a doc comment will not preclude a field from being considered a diagnostic argument // Tests that a doc comment will not preclude a field from being considered a diagnostic argument
//@ normalize-stderr-test: "the following other types implement trait `IntoDiagArg`:(?:.*\n){0,9}\s+and \d+ others" -> "normalized in stderr" //@ normalize-stderr: "the following other types implement trait `IntoDiagArg`:(?:.*\n){0,9}\s+and \d+ others" -> "normalized in stderr"
//@ normalize-stderr-test: "(COMPILER_DIR/.*\.rs):[0-9]+:[0-9]+" -> "$1:LL:CC" //@ normalize-stderr: "(COMPILER_DIR/.*\.rs):[0-9]+:[0-9]+" -> "$1:LL:CC"
// The proc_macro2 crate handles spans differently when on beta/stable release rather than nightly, // The proc_macro2 crate handles spans differently when on beta/stable release rather than nightly,
// changing the output of this test. Since Subdiagnostic is strictly internal to the compiler // changing the output of this test. Since Subdiagnostic is strictly internal to the compiler

View file

@ -1,7 +1,7 @@
//@ check-fail //@ check-fail
// Tests error conditions for specifying diagnostics using #[derive(Diagnostic)] // Tests error conditions for specifying diagnostics using #[derive(Diagnostic)]
//@ normalize-stderr-test: "the following other types implement trait `IntoDiagArg`:(?:.*\n){0,9}\s+and \d+ others" -> "normalized in stderr" //@ normalize-stderr: "the following other types implement trait `IntoDiagArg`:(?:.*\n){0,9}\s+and \d+ others" -> "normalized in stderr"
//@ normalize-stderr-test: "(COMPILER_DIR/.*\.rs):[0-9]+:[0-9]+" -> "$1:LL:CC" //@ normalize-stderr: "(COMPILER_DIR/.*\.rs):[0-9]+:[0-9]+" -> "$1:LL:CC"
// The proc_macro2 crate handles spans differently when on beta/stable release rather than nightly, // The proc_macro2 crate handles spans differently when on beta/stable release rather than nightly,
// changing the output of this test. Since Diagnostic is strictly internal to the compiler // changing the output of this test. Since Diagnostic is strictly internal to the compiler

View file

@ -1,4 +1,4 @@
//@ normalize-stderr-test: "(abi|pref|unadjusted_abi_align): Align\([1-8] bytes\)" -> "$1: $$SOME_ALIGN" //@ normalize-stderr: "(abi|pref|unadjusted_abi_align): Align\([1-8] bytes\)" -> "$1: $$SOME_ALIGN"
/*! /*!
C doesn't have zero-sized types... except it does. C doesn't have zero-sized types... except it does.

View file

@ -1,9 +1,9 @@
//@ normalize-stderr-test: "(abi|pref|unadjusted_abi_align): Align\([1-8] bytes\)" -> "$1: $$SOME_ALIGN" //@ normalize-stderr: "(abi|pref|unadjusted_abi_align): Align\([1-8] bytes\)" -> "$1: $$SOME_ALIGN"
//@ normalize-stderr-test: "(size): Size\([48] bytes\)" -> "$1: $$SOME_SIZE" //@ normalize-stderr: "(size): Size\([48] bytes\)" -> "$1: $$SOME_SIZE"
//@ normalize-stderr-test: "(can_unwind): (true|false)" -> "$1: $$SOME_BOOL" //@ normalize-stderr: "(can_unwind): (true|false)" -> "$1: $$SOME_BOOL"
//@ normalize-stderr-test: "(valid_range): 0\.\.=(4294967295|18446744073709551615)" -> "$1: $$FULL" //@ normalize-stderr: "(valid_range): 0\.\.=(4294967295|18446744073709551615)" -> "$1: $$FULL"
// This pattern is prepared for when we account for alignment in the niche. // This pattern is prepared for when we account for alignment in the niche.
//@ normalize-stderr-test: "(valid_range): [1-9]\.\.=(429496729[0-9]|1844674407370955161[0-9])" -> "$1: $$NON_NULL" //@ normalize-stderr: "(valid_range): [1-9]\.\.=(429496729[0-9]|1844674407370955161[0-9])" -> "$1: $$NON_NULL"
// Some attributes are only computed for release builds: // Some attributes are only computed for release builds:
//@ compile-flags: -O //@ compile-flags: -O
#![feature(rustc_attrs)] #![feature(rustc_attrs)]

View file

@ -1,5 +1,5 @@
//@ only-x86_64 //@ only-x86_64
//@ normalize-stderr-test: "(abi|pref|unadjusted_abi_align): Align\([1-8] bytes\)" -> "$1: $$SOME_ALIGN" //@ normalize-stderr: "(abi|pref|unadjusted_abi_align): Align\([1-8] bytes\)" -> "$1: $$SOME_ALIGN"
#![feature(rustc_attrs)] #![feature(rustc_attrs)]
#![crate_type = "lib"] #![crate_type = "lib"]

View file

@ -1,4 +1,4 @@
//@ normalize-stderr-test: "(abi|pref|unadjusted_abi_align): Align\([1-8] bytes\)" -> "$1: $$SOME_ALIGN" //@ normalize-stderr: "(abi|pref|unadjusted_abi_align): Align\([1-8] bytes\)" -> "$1: $$SOME_ALIGN"
//@ only-x86_64 //@ only-x86_64
//@ revisions: x86_64-linux //@ revisions: x86_64-linux

View file

@ -5,8 +5,8 @@
// line arguments and is only run on windows. // line arguments and is only run on windows.
// //
//@ only-windows //@ only-windows
//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR" //@ normalize-stderr: "os error \d+" -> "os error $$ERR"
//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " //@ normalize-stderr: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING "
//@ compile-flags: --cfg cmdline_set @{{src-base}}\argfile\commandline-argfile-missing.args //@ compile-flags: --cfg cmdline_set @{{src-base}}\argfile\commandline-argfile-missing.args
#[cfg(not(cmdline_set))] #[cfg(not(cmdline_set))]

View file

@ -6,8 +6,8 @@
// windows. // windows.
// //
//@ ignore-windows //@ ignore-windows
//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR" //@ normalize-stderr: "os error \d+" -> "os error $$ERR"
//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " //@ normalize-stderr: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING "
//@ compile-flags: --cfg cmdline_set @{{src-base}}/argfile/commandline-argfile-missing.args //@ compile-flags: --cfg cmdline_set @{{src-base}}/argfile/commandline-argfile-missing.args
#[cfg(not(cmdline_set))] #[cfg(not(cmdline_set))]

View file

@ -5,9 +5,9 @@
// line arguments and is only run on windows. // line arguments and is only run on windows.
// //
//@ only-windows //@ only-windows
//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR" //@ normalize-stderr: "os error \d+" -> "os error $$ERR"
//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " //@ normalize-stderr: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING "
//@ normalize-stderr-test: "commandline-argfile-missing2.args:[^(]*" -> "commandline-argfile-missing2.args: $$FILE_MISSING " //@ normalize-stderr: "commandline-argfile-missing2.args:[^(]*" -> "commandline-argfile-missing2.args: $$FILE_MISSING "
//@ compile-flags: --cfg cmdline_set @{{src-base}}\argfile\commandline-argfile-missing.args @{{src-base}}\argfile\commandline-argfile-badutf8.args @{{src-base}}\argfile\commandline-argfile-missing2.args //@ compile-flags: --cfg cmdline_set @{{src-base}}\argfile\commandline-argfile-missing.args @{{src-base}}\argfile\commandline-argfile-badutf8.args @{{src-base}}\argfile\commandline-argfile-missing2.args
#[cfg(not(cmdline_set))] #[cfg(not(cmdline_set))]

View file

@ -6,9 +6,9 @@
// windows. // windows.
// //
//@ ignore-windows //@ ignore-windows
//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR" //@ normalize-stderr: "os error \d+" -> "os error $$ERR"
//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " //@ normalize-stderr: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING "
//@ normalize-stderr-test: "commandline-argfile-missing2.args:[^(]*" -> "commandline-argfile-missing2.args: $$FILE_MISSING " //@ normalize-stderr: "commandline-argfile-missing2.args:[^(]*" -> "commandline-argfile-missing2.args: $$FILE_MISSING "
//@ compile-flags: --cfg cmdline_set @{{src-base}}/argfile/commandline-argfile-missing.args @{{src-base}}/argfile/commandline-argfile-badutf8.args @{{src-base}}/argfile/commandline-argfile-missing2.args //@ compile-flags: --cfg cmdline_set @{{src-base}}/argfile/commandline-argfile-missing.args @{{src-base}}/argfile/commandline-argfile-badutf8.args @{{src-base}}/argfile/commandline-argfile-missing2.args
#[cfg(not(cmdline_set))] #[cfg(not(cmdline_set))]

View file

@ -1,4 +1,4 @@
//@ normalize-stderr-test: "and \d+ other candidates" -> "and N other candidates" //@ normalize-stderr: "and \d+ other candidates" -> "and N other candidates"
trait Get { trait Get {
type Value; type Value;

View file

@ -1,4 +1,4 @@
//@ normalize-stderr-test: "DefId\(.+?\)" -> "DefId(..)" //@ normalize-stderr: "DefId\(.+?\)" -> "DefId(..)"
#![feature(rustc_attrs)] #![feature(rustc_attrs)]

View file

@ -1,4 +1,4 @@
//@ normalize-stderr-test: "DefId\(.+?\)" -> "DefId(..)" //@ normalize-stderr: "DefId\(.+?\)" -> "DefId(..)"
#![feature(rustc_attrs)] #![feature(rustc_attrs)]
fn bar() { fn bar() {

View file

@ -1,4 +1,4 @@
//@ normalize-stderr-test: "couldn't read.*" -> "couldn't read the file" //@ normalize-stderr: "couldn't read.*" -> "couldn't read the file"
#![doc = include_str!("../not_existing_file.md")] #![doc = include_str!("../not_existing_file.md")]
struct Documented {} struct Documented {}

View file

@ -4,8 +4,8 @@
//@ check-pass //@ check-pass
//@ no-auto-check-cfg //@ no-auto-check-cfg
//@ compile-flags: --check-cfg=cfg() //@ compile-flags: --check-cfg=cfg()
//@ normalize-stderr-test: "and \d+ more" -> "and X more" //@ normalize-stderr: "and \d+ more" -> "and X more"
//@ normalize-stderr-test: "`[a-zA-Z0-9_-]+`" -> "`xxx`" //@ normalize-stderr: "`[a-zA-Z0-9_-]+`" -> "`xxx`"
fn main() { fn main() {
cfg!(target_feature = "zebra"); cfg!(target_feature = "zebra");

View file

@ -10,7 +10,7 @@
//@ check-pass //@ check-pass
//@ no-auto-check-cfg //@ no-auto-check-cfg
//@ compile-flags: --check-cfg=cfg() -Zcheck-cfg-all-expected //@ compile-flags: --check-cfg=cfg() -Zcheck-cfg-all-expected
//@ normalize-stderr-test: "`, `" -> "`\n`" //@ normalize-stderr: "`, `" -> "`\n`"
fn main() { fn main() {
cfg!(target_feature = "_UNEXPECTED_VALUE"); cfg!(target_feature = "_UNEXPECTED_VALUE");

View file

@ -4,8 +4,8 @@
//@ needs-llvm-components: x86 //@ needs-llvm-components: x86
//@ compile-flags: --crate-type=lib --target={{src-base}}/codegen/mismatched-data-layout.json -Z unstable-options //@ compile-flags: --crate-type=lib --target={{src-base}}/codegen/mismatched-data-layout.json -Z unstable-options
//@ error-pattern: differs from LLVM target's //@ error-pattern: differs from LLVM target's
//@ normalize-stderr-test: "`, `[A-Za-z0-9-:]*`" -> "`, `normalized data layout`" //@ normalize-stderr: "`, `[A-Za-z0-9-:]*`" -> "`, `normalized data layout`"
//@ normalize-stderr-test: "layout, `[A-Za-z0-9-:]*`" -> "layout, `normalized data layout`" //@ normalize-stderr: "layout, `[A-Za-z0-9-:]*`" -> "layout, `normalized data layout`"
#![feature(lang_items, no_core, auto_traits)] #![feature(lang_items, no_core, auto_traits)]
#![no_core] #![no_core]

View file

@ -6,4 +6,4 @@
// output so that the stdout with LLVM-at-HEAD matches the output of the LLVM // output so that the stdout with LLVM-at-HEAD matches the output of the LLVM
// versions currently used by default. // versions currently used by default.
// FIXME(#133919): Once Rust upgrades to LLVM 20, remove this. // FIXME(#133919): Once Rust upgrades to LLVM 20, remove this.
//@ normalize-stdout-test: "(?m)^ *lime1\n" -> "" //@ normalize-stdout: "(?m)^ *lime1\n" -> ""

View file

@ -1,9 +1,9 @@
//@ check-fail //@ check-fail
//@ known-bug: #97477 //@ known-bug: #97477
//@ failure-status: 101 //@ failure-status: 101
//@ normalize-stderr-test: "note: .*\n\n" -> "" //@ normalize-stderr: "note: .*\n\n" -> ""
//@ normalize-stderr-test: "thread 'rustc' panicked.*\n" -> "" //@ normalize-stderr: "thread 'rustc' panicked.*\n" -> ""
//@ normalize-stderr-test: "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: " //@ normalize-stderr: "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: "
//@ rustc-env:RUST_BACKTRACE=0 //@ rustc-env:RUST_BACKTRACE=0
// This test used to cause an ICE in rustc_mir::interpret::step::eval_rvalue_into_place // This test used to cause an ICE in rustc_mir::interpret::step::eval_rvalue_into_place

View file

@ -1,5 +1,5 @@
// ignore-tidy-linelength // ignore-tidy-linelength
//@ normalize-stderr-test: "values of the type `[^`]+` are too big" -> "values of the type $$REALLY_TOO_BIG are too big" //@ normalize-stderr: "values of the type `[^`]+` are too big" -> "values of the type $$REALLY_TOO_BIG are too big"
#![feature(transmute_generic_consts)] #![feature(transmute_generic_consts)]

View file

@ -1,6 +1,6 @@
// Strip out raw byte dumps to make comparison platform-independent: // Strip out raw byte dumps to make comparison platform-independent:
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" //@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" //@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
#![feature( #![feature(
slice_from_ptr_range, slice_from_ptr_range,

View file

@ -1,16 +1,16 @@
//@ compile-flags: -Ztreat-err-as-bug=1 //@ compile-flags: -Ztreat-err-as-bug=1
//@ failure-status: 101 //@ failure-status: 101
//@ rustc-env:RUST_BACKTRACE=1 //@ rustc-env:RUST_BACKTRACE=1
//@ normalize-stderr-test: "\nerror: .*unexpectedly panicked.*\n\n" -> "" //@ normalize-stderr: "\nerror: .*unexpectedly panicked.*\n\n" -> ""
//@ normalize-stderr-test: "note: we would appreciate a bug report.*\n\n" -> "" //@ normalize-stderr: "note: we would appreciate a bug report.*\n\n" -> ""
//@ normalize-stderr-test: "note: compiler flags.*\n\n" -> "" //@ normalize-stderr: "note: compiler flags.*\n\n" -> ""
//@ normalize-stderr-test: "note: rustc.*running on.*\n\n" -> "" //@ normalize-stderr: "note: rustc.*running on.*\n\n" -> ""
//@ normalize-stderr-test: "thread.*panicked.*:\n.*\n" -> "" //@ normalize-stderr: "thread.*panicked.*:\n.*\n" -> ""
//@ normalize-stderr-test: "stack backtrace:\n" -> "" //@ normalize-stderr: "stack backtrace:\n" -> ""
//@ normalize-stderr-test: "\s\d{1,}: .*\n" -> "" //@ normalize-stderr: "\s\d{1,}: .*\n" -> ""
//@ normalize-stderr-test: "\s at .*\n" -> "" //@ normalize-stderr: "\s at .*\n" -> ""
//@ normalize-stderr-test: ".*note: Some details.*\n" -> "" //@ normalize-stderr: ".*note: Some details.*\n" -> ""
//@ normalize-stderr-test: ".*omitted \d{1,} frame.*\n" -> "" //@ normalize-stderr: ".*omitted \d{1,} frame.*\n" -> ""
#![allow(unconditional_panic)] #![allow(unconditional_panic)]
const X: i32 = 1 / 0; //~ERROR constant const X: i32 = 1 / 0; //~ERROR constant

View file

@ -2,9 +2,9 @@
#![feature(const_heap)] #![feature(const_heap)]
// Strip out raw byte dumps to make comparison platform-independent: // Strip out raw byte dumps to make comparison platform-independent:
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" //@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" //@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
//@ normalize-stderr-test: "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP" //@ normalize-stderr: "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP"
use std::intrinsics; use std::intrinsics;

View file

@ -1,7 +1,7 @@
//@ stderr-per-bitwidth //@ stderr-per-bitwidth
//@ ignore-endian-big //@ ignore-endian-big
// ignore-tidy-linelength // ignore-tidy-linelength
//@ normalize-stderr-test: "╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼" -> "╾ALLOC_ID$1╼" //@ normalize-stderr: "╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼" -> "╾ALLOC_ID$1╼"
#![allow(invalid_value)] #![allow(invalid_value)]
#![feature(never_type, rustc_attrs, ptr_metadata, slice_from_ptr_range, const_slice_from_ptr_range)] #![feature(never_type, rustc_attrs, ptr_metadata, slice_from_ptr_range, const_slice_from_ptr_range)]

View file

@ -1,7 +1,7 @@
// Strip out raw byte dumps to make comparison platform-independent: // Strip out raw byte dumps to make comparison platform-independent:
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" //@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" //@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
//@ normalize-stderr-test: "0x0+" -> "0x0" //@ normalize-stderr: "0x0+" -> "0x0"
#![feature(never_type)] #![feature(never_type)]
#![allow(invalid_value)] #![allow(invalid_value)]

View file

@ -1,6 +1,6 @@
// Strip out raw byte dumps to make comparison platform-independent: // Strip out raw byte dumps to make comparison platform-independent:
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" //@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP" //@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP"
#![allow(invalid_value)] // make sure we cannot allow away the errors tested here #![allow(invalid_value)] // make sure we cannot allow away the errors tested here
#![feature(rustc_attrs, ptr_metadata)] #![feature(rustc_attrs, ptr_metadata)]

View file

@ -1,7 +1,7 @@
// ignore-tidy-linelength // ignore-tidy-linelength
// Strip out raw byte dumps to make comparison platform-independent: // Strip out raw byte dumps to make comparison platform-independent:
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" //@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" //@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
#![allow(invalid_value)] #![allow(invalid_value)]
use std::mem; use std::mem;

View file

@ -1,6 +1,6 @@
// Strip out raw byte dumps to make comparison platform-independent: // Strip out raw byte dumps to make comparison platform-independent:
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" //@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" //@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
#![feature(core_intrinsics)] #![feature(core_intrinsics)]
#![feature(never_type)] #![feature(never_type)]

View file

@ -5,10 +5,10 @@
use std::{ptr, mem}; use std::{ptr, mem};
// Strip out raw byte dumps to make comparison platform-independent: // Strip out raw byte dumps to make comparison platform-independent:
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" //@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" //@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
//@ normalize-stderr-test: "offset \d+" -> "offset N" //@ normalize-stderr: "offset \d+" -> "offset N"
//@ normalize-stderr-test: "size \d+" -> "size N" //@ normalize-stderr: "size \d+" -> "size N"
/// A newtype wrapper to prevent MIR generation from inserting reborrows that would affect the error /// A newtype wrapper to prevent MIR generation from inserting reborrows that would affect the error

View file

@ -1,6 +1,6 @@
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" //@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
//@ normalize-stderr-test: "( 0x[0-9a-f][0-9a-f] │)? ([0-9a-f][0-9a-f] |__ |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> " HEX_DUMP" //@ normalize-stderr: "( 0x[0-9a-f][0-9a-f] │)? ([0-9a-f][0-9a-f] |__ |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> " HEX_DUMP"
//@ normalize-stderr-test: "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP" //@ normalize-stderr: "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP"
use std::cell::UnsafeCell; use std::cell::UnsafeCell;
use std::mem; use std::mem;

View file

@ -1,6 +1,6 @@
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" //@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
//@ normalize-stderr-test: "( 0x[0-9a-f][0-9a-f] │)? ([0-9a-f][0-9a-f] |__ |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> " HEX_DUMP" //@ normalize-stderr: "( 0x[0-9a-f][0-9a-f] │)? ([0-9a-f][0-9a-f] |__ |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> " HEX_DUMP"
//@ normalize-stderr-test: "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP" //@ normalize-stderr: "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP"
use std::sync::Mutex; use std::sync::Mutex;

View file

@ -1,5 +1,5 @@
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" //@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" //@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
#![feature(sync_unsafe_cell)] #![feature(sync_unsafe_cell)]

View file

@ -1,5 +1,5 @@
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" //@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" //@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
#![allow(static_mut_refs)] #![allow(static_mut_refs)]
fn invalid() { fn invalid() {

View file

@ -1,8 +1,8 @@
// https://github.com/rust-lang/rust/issues/55223 // https://github.com/rust-lang/rust/issues/55223
// Strip out raw byte dumps to make comparison platform-independent: // Strip out raw byte dumps to make comparison platform-independent:
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" //@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" //@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
//@ normalize-stderr-test: "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP" //@ normalize-stderr: "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP"
union Foo<'a> { union Foo<'a> {
y: &'a (), y: &'a (),

Some files were not shown because too many files have changed in this diff Show more