compiletest: properly handle revisioned run-rustfix tests
This commit is contained in:
parent
fc1a4c5cc9
commit
5dc276c0da
4 changed files with 53 additions and 1 deletions
|
|
@ -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`
|
||||
}
|
||||
|
|
@ -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
|
||||
|
||||
9
tests/ui/compiletest-self-test/run-rustfix-revisions.rs
Normal file
9
tests/ui/compiletest-self-test/run-rustfix-revisions.rs
Normal 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`
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue