Skip to content

Commit

Permalink
Rollup merge of #134759 - Zalathar:normalize, r=jieyouxu
Browse files Browse the repository at this point in the history
compiletest: Remove the `-test` suffix from normalize directives

This suffix was an artifact of using the same condition-checking engine as the `ignore-*` and `only-*` directives, but in practice we have only 2 tests that legitimately use a condition, and both of them only care about 32-bit vs 64-bit.

This PR detaches `normalize-*` directives from the condition checker, and replaces it with a much simpler system of four explicit `NormalizeKind` values. It then takes advantage of that simplicity to get rid of the `-test` suffix.

---

Addresses one of the points of #126372.

The new name-checking code is a bit quaint, but I think it's a definite improvement over the status quo.

---

The corresponding dev-guide update is rust-lang/rustc-dev-guide#2172.

r? jieyouxu
  • Loading branch information
jieyouxu authored Dec 27, 2024
2 parents 7bbbfc6 + 835fbcb commit bc3e891
Show file tree
Hide file tree
Showing 246 changed files with 508 additions and 485 deletions.
4 changes: 2 additions & 2 deletions src/tools/compiletest/src/directive-list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
"needs-xray",
"no-auto-check-cfg",
"no-prefer-dynamic",
"normalize-stderr",
"normalize-stderr-32bit",
"normalize-stderr-64bit",
"normalize-stderr-test",
"normalize-stdout-test",
"normalize-stdout",
"only-16bit",
"only-32bit",
"only-64bit",
Expand Down
61 changes: 47 additions & 14 deletions src/tools/compiletest/src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use tracing::*;
use crate::common::{Config, Debugger, FailMode, Mode, PassMode};
use crate::debuggers::{extract_cdb_version, extract_gdb_version};
use crate::header::auxiliary::{AuxProps, parse_and_update_aux};
use crate::header::cfg::{MatchOutcome, parse_cfg_name_directive};
use crate::header::needs::CachedNeedsConditions;
use crate::util::static_regex;

Expand Down Expand Up @@ -472,11 +471,24 @@ impl TestProps {

config.set_name_directive(ln, IGNORE_PASS, &mut self.ignore_pass);

if let Some(rule) = config.parse_custom_normalization(ln, "normalize-stdout") {
self.normalize_stdout.push(rule);
}
if let Some(rule) = config.parse_custom_normalization(ln, "normalize-stderr") {
self.normalize_stderr.push(rule);
if let Some(NormalizeRule { kind, regex, replacement }) =
config.parse_custom_normalization(ln)
{
let rule_tuple = (regex, replacement);
match kind {
NormalizeKind::Stdout => self.normalize_stdout.push(rule_tuple),
NormalizeKind::Stderr => self.normalize_stderr.push(rule_tuple),
NormalizeKind::Stderr32bit => {
if config.target_cfg().pointer_width == 32 {
self.normalize_stderr.push(rule_tuple);
}
}
NormalizeKind::Stderr64bit => {
if config.target_cfg().pointer_width == 64 {
self.normalize_stderr.push(rule_tuple);
}
}
}
}

if let Some(code) = config
Expand Down Expand Up @@ -966,20 +978,28 @@ impl Config {
}
}

fn parse_custom_normalization(&self, line: &str, prefix: &str) -> Option<(String, String)> {
let parsed = parse_cfg_name_directive(self, line, prefix);
if parsed.outcome != MatchOutcome::Match {
return None;
}
let name = parsed.name.expect("successful match always has a name");
fn parse_custom_normalization(&self, line: &str) -> Option<NormalizeRule> {
// FIXME(Zalathar): Integrate name/value splitting into `DirectiveLine`
// instead of doing it here.
let (directive_name, _value) = line.split_once(':')?;

let kind = match directive_name {
"normalize-stdout" => NormalizeKind::Stdout,
"normalize-stderr" => NormalizeKind::Stderr,
"normalize-stderr-32bit" => NormalizeKind::Stderr32bit,
"normalize-stderr-64bit" => NormalizeKind::Stderr64bit,
_ => return None,
};

// FIXME(Zalathar): The normalize rule parser should only care about
// the value part, not the "line" (which isn't even the whole line).
let Some((regex, replacement)) = parse_normalize_rule(line) else {
panic!(
"couldn't parse custom normalization rule: `{line}`\n\
help: expected syntax is: `{prefix}-{name}: \"REGEX\" -> \"REPLACEMENT\"`"
help: expected syntax is: `{directive_name}: \"REGEX\" -> \"REPLACEMENT\"`"
);
};
Some((regex, replacement))
Some(NormalizeRule { kind, regex, replacement })
}

fn parse_name_directive(&self, line: &str, directive: &str) -> bool {
Expand Down Expand Up @@ -1105,6 +1125,19 @@ fn expand_variables(mut value: String, config: &Config) -> String {
value
}

struct NormalizeRule {
kind: NormalizeKind,
regex: String,
replacement: String,
}

enum NormalizeKind {
Stdout,
Stderr,
Stderr32bit,
Stderr64bit,
}

/// Parses the regex and replacement values of a `//@ normalize-*` header,
/// in the format:
/// ```text
Expand Down
4 changes: 2 additions & 2 deletions src/tools/compiletest/src/header/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ pub(super) fn handle_only(config: &Config, line: &str) -> IgnoreDecision {
}

/// Parses a name-value directive which contains config-specific information, e.g., `ignore-x86`
/// or `normalize-stderr-32bit`.
pub(super) fn parse_cfg_name_directive<'a>(
/// or `only-windows`.
fn parse_cfg_name_directive<'a>(
config: &Config,
line: &'a str,
prefix: &str,
Expand Down
7 changes: 3 additions & 4 deletions src/tools/tidy/src/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ const ANNOTATIONS_TO_IGNORE: &[&str] = &[
"// gdb",
"// lldb",
"// cdb",
"// normalize-stderr-test",
"//@ normalize-stderr-test",
"//@ normalize-stderr",
];

fn generate_problems<'a>(
Expand Down Expand Up @@ -198,8 +197,8 @@ fn should_ignore(line: &str) -> bool {

// For `ui_test`-style UI test directives, also ignore
// - `//@[rev] compile-flags`
// - `//@[rev] normalize-stderr-test`
|| static_regex!("\\s*//@(\\[.*\\]) (compile-flags|normalize-stderr-test|error-pattern).*")
// - `//@[rev] normalize-stderr`
|| static_regex!("\\s*//@(\\[.*\\]) (compile-flags|normalize-stderr|error-pattern).*")
.is_match(line)
// Matching for rustdoc tests commands.
// It allows to prevent them emitting warnings like `line longer than 100 chars`.
Expand Down
6 changes: 3 additions & 3 deletions tests/rustdoc-ui/2024-doctests-checks.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//@ check-pass
//@ edition: 2024
//@ compile-flags: --test --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
//@ normalize-stdout: "tests/rustdoc-ui" -> "$$DIR"
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"

/// ```
/// let x = 12;
Expand Down
6 changes: 3 additions & 3 deletions tests/rustdoc-ui/2024-doctests-crate-attribute.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//@ check-pass
//@ edition: 2024
//@ compile-flags: --test --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
//@ normalize-stdout: "tests/rustdoc-ui" -> "$$DIR"
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"

/// This doctest is used to ensure that if a crate attribute is present,
/// it will not be part of the merged doctests.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
// line arguments and is only run on windows.
//
//@ only-windows
//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR"
//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING "
//@ normalize-stderr: "os error \d+" -> "os error $$ERR"
//@ normalize-stderr: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING "
//@ compile-flags: --cfg cmdline_set @{{src-base}}\argfile\commandline-argfile-missing.args

#[cfg(not(cmdline_set))]
Expand Down
4 changes: 2 additions & 2 deletions tests/rustdoc-ui/argfile/commandline-argfile-missing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// windows.
//
//@ ignore-windows
//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR"
//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING "
//@ normalize-stderr: "os error \d+" -> "os error $$ERR"
//@ normalize-stderr: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING "
//@ compile-flags: --cfg cmdline_set @{{src-base}}/argfile/commandline-argfile-missing.args

#[cfg(not(cmdline_set))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
// line arguments and is only run on windows.
//
//@ only-windows
//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR"
//@ normalize-stderr-test: "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: "os error \d+" -> "os error $$ERR"
//@ normalize-stderr: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.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

#[cfg(not(cmdline_set))]
Expand Down
6 changes: 3 additions & 3 deletions tests/rustdoc-ui/argfile/commandline-argfile-multiple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
// windows.
//
//@ ignore-windows
//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR"
//@ normalize-stderr-test: "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: "os error \d+" -> "os error $$ERR"
//@ normalize-stderr: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.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

#[cfg(not(cmdline_set))]
Expand Down
2 changes: 1 addition & 1 deletion tests/rustdoc-ui/disambiguator-endswith-named-suffix.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//@ 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!{}]
Expand Down
2 changes: 1 addition & 1 deletion tests/rustdoc-ui/doctest/block-doc-comment.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ check-pass
//@ 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.

Expand Down
4 changes: 2 additions & 2 deletions tests/rustdoc-ui/doctest/cfg-test.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//@ check-pass
//@ compile-flags:--test --test-args --test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ 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
// sure `cfg(test)` is not active when running `rustdoc --test`.
Expand Down
6 changes: 3 additions & 3 deletions tests/rustdoc-ui/doctest/check-cfg-test.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//@ check-pass
//@ compile-flags: --test --nocapture --check-cfg=cfg(feature,values("test")) -Z unstable-options
//@ normalize-stderr-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stderr: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"

/// The doctest will produce a warning because feature invalid is unexpected
/// ```
Expand Down
6 changes: 3 additions & 3 deletions tests/rustdoc-ui/doctest/comment-in-attr-134221-2.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//@ compile-flags:--test --test-args --test-threads=1
//@ failure-status: 101
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"

//! ```
#![doc = "#![all\
Expand Down
6 changes: 3 additions & 3 deletions tests/rustdoc-ui/doctest/comment-in-attr-134221.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

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

/*!
```rust
Expand Down
4 changes: 2 additions & 2 deletions tests/rustdoc-ui/doctest/dead-code-2024.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

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

#![doc(test(attr(allow(unused_variables), deny(warnings))))]
Expand Down
4 changes: 2 additions & 2 deletions tests/rustdoc-ui/doctest/dead-code.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// This test ensures that the doctest will not use `#[allow(unused)]`.

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

#![doc(test(attr(allow(unused_variables), deny(warnings))))]
Expand Down
4 changes: 2 additions & 2 deletions tests/rustdoc-ui/doctest/display-output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
//@ check-pass
//@ edition:2018
//@ compile-flags:--test --test-args=--show-output
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"

/// ```
/// #![warn(unused)]
Expand Down
4 changes: 2 additions & 2 deletions tests/rustdoc-ui/doctest/doc-comment-multi-line-attr.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Regression test for #97440: Multiline inner attribute triggers ICE during doctest
//@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ check-pass

//! ```rust
Expand Down
4 changes: 2 additions & 2 deletions tests/rustdoc-ui/doctest/doc-comment-multi-line-cfg-attr.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ check-pass

/// ```
Expand Down
4 changes: 2 additions & 2 deletions tests/rustdoc-ui/doctest/doc-test-doctest-feature.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//@ check-pass
//@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"

// Make sure `cfg(doctest)` is set when finding doctests but not inside
// the doctests.
Expand Down
4 changes: 2 additions & 2 deletions tests/rustdoc-ui/doctest/doc-test-rustdoc-feature.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//@ check-pass
//@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"

#![feature(doc_cfg)]

Expand Down
4 changes: 2 additions & 2 deletions tests/rustdoc-ui/doctest/doctest-multiline-crate-attribute.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ compile-flags:--test --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ check-pass

/// ```
Expand Down
4 changes: 2 additions & 2 deletions tests/rustdoc-ui/doctest/doctest-output-include-fail.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//@ edition:2024
//@ compile-flags:--test --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101

// https://github.com/rust-lang/rust/issues/130470
Expand Down
4 changes: 2 additions & 2 deletions tests/rustdoc-ui/doctest/doctest-output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
//@[edition2024]edition:2015
//@[edition2024]aux-build:extern_macros.rs
//@[edition2024]compile-flags:--test --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ check-pass

//! ```
Expand Down
4 changes: 2 additions & 2 deletions tests/rustdoc-ui/doctest/failed-doctest-compile-fail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// adapted to use that, and that normalize line can go away

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

/// ```compile_fail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// adapted to use that, and that normalize line can go away

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

/// <https://github.com/rust-lang/rust/issues/91014>
Expand Down
Loading

0 comments on commit bc3e891

Please sign in to comment.