-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add libstd struct misspelling type check diagnostics
add tests broaden libstd support add tests fmt eliminate match attempts on names < 2 chars addresses CI errors during match attempts against generic type names like "N". These will not be the correct suggestions. remove *Debug structs, overlaps with debug macro typo refactor match approach filter on the type namespace and filter out tool mod types update tests
- Loading branch information
1 parent
cbc73dc
commit 731c4ea
Showing
63 changed files
with
2,806 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// checks case typos with libstd::alloc structs | ||
fn main(){} | ||
|
||
fn test_layout(_x: LayOut){} | ||
//~^ ERROR: cannot find type `LayOut` in this scope | ||
fn test_system(_x: system){} | ||
//~^ ERROR: cannot find type `system` in this scope |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
error[E0412]: cannot find type `LayOut` in this scope | ||
--> $DIR/alloc.rs:4:20 | ||
| | ||
LL | fn test_layout(_x: LayOut){} | ||
| ^^^^^^ not found in this scope | ||
| | ||
help: did you mean `std::alloc::Layout`? | ||
| | ||
LL | fn test_layout(_x: std::alloc::Layout){} | ||
| ^^^^^^^^^^^^^^^^^^ | ||
|
||
error[E0412]: cannot find type `system` in this scope | ||
--> $DIR/alloc.rs:6:20 | ||
| | ||
LL | fn test_system(_x: system){} | ||
| ^^^^^^ not found in this scope | ||
| | ||
help: did you mean `std::alloc::System`? | ||
| | ||
LL | fn test_system(_x: std::alloc::System){} | ||
| ^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0412`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// checks case typos with libstd::any structs | ||
fn main(){} | ||
|
||
fn test_typeid(_x: Typeid){} | ||
//~^ ERROR: cannot find type `Typeid` in this scope |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error[E0412]: cannot find type `Typeid` in this scope | ||
--> $DIR/any.rs:4:20 | ||
| | ||
LL | fn test_typeid(_x: Typeid){} | ||
| ^^^^^^ not found in this scope | ||
| | ||
help: did you mean `std::any::TypeId`? | ||
| | ||
LL | fn test_typeid(_x: std::any::TypeId){} | ||
| ^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0412`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// checks case typos with libstd::ascii structs | ||
fn main(){} | ||
|
||
fn test_escdef(_x: Escapedefault){} | ||
//~^ ERROR: cannot find type `Escapedefault` in this scope |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
error[E0412]: cannot find type `Escapedefault` in this scope | ||
--> $DIR/ascii.rs:4:20 | ||
| | ||
LL | fn test_escdef(_x: Escapedefault){} | ||
| ^^^^^^^^^^^^^ not found in this scope | ||
| | ||
help: did you mean one of these?: | ||
| | ||
LL | fn test_escdef(_x: std::ascii::EscapeDefault){} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
LL | fn test_escdef(_x: std::char::EscapeDefault){} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
LL | fn test_escdef(_x: std::str::EscapeDefault){} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0412`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// checks case typos with libstd::cell structs | ||
fn main(){} | ||
|
||
fn test_cell(_x: cell<()>){} | ||
//~^ ERROR: cannot find type `cell` in this scope |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error[E0412]: cannot find type `cell` in this scope | ||
--> $DIR/cell.rs:4:18 | ||
| | ||
LL | fn test_cell(_x: cell<()>){} | ||
| ^^^^ not found in this scope | ||
| | ||
help: did you mean `std::cell::Cell`? | ||
| | ||
LL | fn test_cell(_x: std::cell::Cell<()>){} | ||
| ^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0412`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// checks case typos with libstd::char structs | ||
fn main(){} | ||
|
||
fn test_du16(_x: DecodeUTF16<()>){} | ||
//~^ ERROR: cannot find type `DecodeUTF16` in this scope | ||
|
||
fn test_edflt(_x: Escapedefault){} | ||
//~^ ERROR: cannot find type `Escapedefault` in this scope | ||
|
||
fn test_euni(_x: Escapeunicode){} | ||
//~^ ERROR: cannot find type `Escapeunicode` in this scope | ||
|
||
fn test_tolow(_x: Tolowercase){} | ||
//~^ ERROR: cannot find type `Tolowercase` in this scope | ||
|
||
fn test_toupper(_x: Touppercase){} | ||
//~^ ERROR: cannot find type `Touppercase` in this scope |
Oops, something went wrong.