Closed
Description
use std::sync::atomic;
fn main() {
NonZeroU8::new(1);
}
error[E0433]: failed to resolve: use of undeclared type `NonZeroU8`
--> src/main.rs:4:5
|
4 | NonZeroU8::new(1);
| ^^^^^^^^^ not found in this scope
|
help: consider importing one of these items
|
1 | use core::num::NonZeroU8;
|
1 | use crate::atomic::fmt::str::iter::option::convert::num::NonZeroU8;
The suggested import path, crate::atomic::fmt::str::iter::option::convert::num::NonZeroU8
, goes through private imports (so it doesn't work), and is also ridiculously long. These suggestions might want to take inspiration from rust-analyzer and only display the shortest path(s) to any candidate (and also should not include private imports).