-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #89283 - camelid:issue-83564-test, r=davidtwco
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
src/test/ui/suggestions/core-std-import-order-issue-83564.rs
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,10 @@ | ||
// edition:2018 | ||
|
||
// This is a regression test for #83564. | ||
// For some reason, Rust 2018 or higher is required to reproduce the bug. | ||
|
||
fn main() { | ||
//~^ HELP consider importing one of these items | ||
let _x = NonZeroU32::new(5).unwrap(); | ||
//~^ ERROR failed to resolve: use of undeclared type `NonZeroU32` | ||
} |
16 changes: 16 additions & 0 deletions
16
src/test/ui/suggestions/core-std-import-order-issue-83564.stderr
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,16 @@ | ||
error[E0433]: failed to resolve: use of undeclared type `NonZeroU32` | ||
--> $DIR/core-std-import-order-issue-83564.rs:8:14 | ||
| | ||
LL | let _x = NonZeroU32::new(5).unwrap(); | ||
| ^^^^^^^^^^ not found in this scope | ||
| | ||
help: consider importing one of these items | ||
| | ||
LL | use std::num::NonZeroU32; | ||
| | ||
LL | use core::num::NonZeroU32; | ||
| | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0433`. |