未验证 提交 733aa509 编写于 作者: G Guillaume Gomez 提交者: GitHub

Rollup merge of #89283 - camelid:issue-83564-test, r=davidtwco

Add regression test for issue #83564

cc #83564

r? ``@davidtwco``
// 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`
}
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`.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册