recover wrong-cased uses (Use, USE, etc)
This commit is contained in:
parent
de341fe668
commit
3694429d09
5 changed files with 77 additions and 3 deletions
7
src/test/ui/parser/item-kw-case-mismatch.fixed
Normal file
7
src/test/ui/parser/item-kw-case-mismatch.fixed
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
// run-rustfix
|
||||
#![allow(unused_imports)]
|
||||
|
||||
fn main() {}
|
||||
|
||||
use std::ptr::read; //~ ERROR keyword `use` is written in a wrong case
|
||||
use std::ptr::write; //~ ERROR keyword `use` is written in a wrong case
|
||||
7
src/test/ui/parser/item-kw-case-mismatch.rs
Normal file
7
src/test/ui/parser/item-kw-case-mismatch.rs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
// run-rustfix
|
||||
#![allow(unused_imports)]
|
||||
|
||||
fn main() {}
|
||||
|
||||
Use std::ptr::read; //~ ERROR keyword `use` is written in a wrong case
|
||||
USE std::ptr::write; //~ ERROR keyword `use` is written in a wrong case
|
||||
14
src/test/ui/parser/item-kw-case-mismatch.stderr
Normal file
14
src/test/ui/parser/item-kw-case-mismatch.stderr
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
error: keyword `use` is written in a wrong case
|
||||
--> $DIR/item-kw-case-mismatch.rs:6:1
|
||||
|
|
||||
LL | Use std::ptr::read;
|
||||
| ^^^ help: write it in the correct case (notice the capitalization): `use`
|
||||
|
||||
error: keyword `use` is written in a wrong case
|
||||
--> $DIR/item-kw-case-mismatch.rs:7:1
|
||||
|
|
||||
LL | USE std::ptr::write;
|
||||
| ^^^ help: write it in the correct case: `use`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue