Skip to content

Commit

Permalink
Require an @ in front of all commands
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Apr 19, 2023
1 parent 4195076 commit 8467c20
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ fn iter_header(testfile: &Path, cfg: Option<&str>, it: &mut dyn FnMut(&str)) {
let ln = ln.trim();
if ln.starts_with("fn") || ln.starts_with("mod") {
return;
} else if let Some(ln) = ln.strip_prefix("//[") {
} else if let Some(ln) = ln.strip_prefix("//@[") {
// A comment like `//[foo]` is specific to revision `foo`
if let Some((lncfg, ln)) = ln.split_once(']') {
if cfg == Some(lncfg) {
Expand All @@ -447,7 +447,7 @@ fn iter_header(testfile: &Path, cfg: Option<&str>, it: &mut dyn FnMut(&str)) {
ln
)
}
} else if let Some(ln) = ln.strip_prefix("//") {
} else if let Some(ln) = ln.strip_prefix("//@") {
it(ln.trim_start());
}
}
Expand Down
6 changes: 3 additions & 3 deletions test-project/tests/assembly/panic.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// assembly-output: emit-asm
// compile-flags: --crate-type rlib
//@assembly-output: emit-asm
//@compile-flags: --crate-type rlib
#![no_std]

#[no_mangle]
fn panic_fun() -> u32 {
// CHECK-LABEL: panic_fun:
// CHECK: ud2
panic!();
}
}
4 changes: 2 additions & 2 deletions test-project/tests/nightly/2018-edition.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// edition:2018
// compile-pass
//@edition:2018
//@compile-pass

pub struct Foo;
impl Foo {
Expand Down
2 changes: 1 addition & 1 deletion test-project/tests/nightly/auxiliary/simple_proc_macro.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// no-prefer-dynamic
//@no-prefer-dynamic

#![crate_type = "proc-macro"]

Expand Down
4 changes: 2 additions & 2 deletions test-project/tests/nightly/some-proc-macro.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// run-pass
// aux-build:simple_proc_macro.rs
//@run-pass
//@aux-build:simple_proc_macro.rs

#![feature(proc_macro_hygiene)]

Expand Down
6 changes: 3 additions & 3 deletions test-project/tests/pretty/macro.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// pretty-compare-only
// pretty-mode:expanded
// pp-exact:macro.pp
//@pretty-compare-only
//@pretty-mode:expanded
//@pp-exact:macro.pp

macro_rules! square {
($x:expr) => {
Expand Down
2 changes: 1 addition & 1 deletion test-project/tests/run-fail/args-panic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// except according to those terms.


// error-pattern:meep
//@error-pattern:meep

#![allow(unknown_features)]
#![feature(box_syntax)]
Expand Down
2 changes: 1 addition & 1 deletion test-project/tests/run-fail/issue-20971.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

// Regression test for Issue #20971.

// error-pattern:Hello, world!
//@error-pattern:Hello, world!

pub trait Parser {
type Input;
Expand Down
2 changes: 1 addition & 1 deletion test-project/tests/run-fail/match-wildcards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// error-pattern:squirrelcupcake
//@error-pattern:squirrelcupcake
fn cmp() -> int {
match (Some('a'), None::<char>) {
(Some(_), _) => { panic!("squirrelcupcake"); }
Expand Down
2 changes: 1 addition & 1 deletion test-project/tests/run-fail/mod-zero.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// error-pattern:attempted remainder with a divisor of zero
//@error-pattern:attempted remainder with a divisor of zero
fn main() {
let y = 0;
let _z = 1 % y;
Expand Down
2 changes: 1 addition & 1 deletion test-project/tests/ui/dyn-keyword.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-rustfix
//@run-rustfix

#![allow(unused_variables)]
#![deny(keyword_idents)]
Expand Down
2 changes: 1 addition & 1 deletion test-project/tests/ui/dyn-keyword.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-rustfix
//@run-rustfix

#![allow(unused_variables)]
#![deny(keyword_idents)]
Expand Down

0 comments on commit 8467c20

Please sign in to comment.