Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,12 +504,10 @@ impl<'test> TestCx<'test> {
let normalized_revision = normalize_revision(revision);
let cfg_arg = ["--cfg", &normalized_revision];
let arg = format!("--cfg={normalized_revision}");
if self
.props
.compile_flags
.windows(2)
.any(|args| args == cfg_arg || args[0] == arg || args[1] == arg)
{
let contains_arg =
self.props.compile_flags.iter().any(|considered_arg| *considered_arg == arg);
let contains_cfg_arg = self.props.compile_flags.windows(2).any(|args| args == cfg_arg);
if contains_arg || contains_cfg_arg {
error!(
"redundant cfg argument `{normalized_revision}` is already created by the \
revision"
Expand Down
1 change: 0 additions & 1 deletion tests/mir-opt/pre-codegen/copy_and_clone.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
//@ [COPY] compile-flags: --cfg=copy
//@ revisions: COPY CLONE

// Test case from https://github.com/rust-lang/rust/issues/128081.
Expand Down
Loading