compiletest: properly handle revisioned run-rustfix tests

This commit is contained in:
许杰友 Jieyou Xu (Joe) 2024-04-07 16:33:56 +00:00
parent fc1a4c5cc9
commit 5dc276c0da
4 changed files with 53 additions and 1 deletions

View file

@ -0,0 +1,9 @@
// Check that revisioned `run-rustfix` does not fail with issues related to `.` in crate name.
//@ revisions: foo
//@[foo] run-rustfix
#![deny(unused_variables)]
fn main() {
let _x = 0usize;
//~^ ERROR unused variable: `x`
}

View file

@ -0,0 +1,14 @@
error: unused variable: `x`
--> $DIR/run-rustfix-revisions.rs:7:9
|
LL | let x = 0usize;
| ^ help: if this is intentional, prefix it with an underscore: `_x`
|
note: the lint level is defined here
--> $DIR/run-rustfix-revisions.rs:4:9
|
LL | #![deny(unused_variables)]
| ^^^^^^^^^^^^^^^^
error: aborting due to 1 previous error

View file

@ -0,0 +1,9 @@
// Check that revisioned `run-rustfix` does not fail with issues related to `.` in crate name.
//@ revisions: foo
//@[foo] run-rustfix
#![deny(unused_variables)]
fn main() {
let x = 0usize;
//~^ ERROR unused variable: `x`
}