Remove "failed to resolve" and use the same format we use in other resolution errors "cannot find `name`". ``` error[E0433]: cannot find `nonexistent` in `existent` --> $DIR/custom_attr_multisegment_error.rs:5:13 | LL | #[existent::nonexistent] | ^^^^^^^^^^^ could not find `nonexistent` in `existent` ```
22 lines
534 B
Rust
22 lines
534 B
Rust
//@ edition:2018
|
|
//
|
|
// This is a regression test for #83564.
|
|
// For some reason, Rust 2018 or higher is required to reproduce the bug.
|
|
//@ run-rustfix
|
|
//@ revisions: no_std std
|
|
//@ [no_std]compile-flags: -C panic=abort
|
|
#![cfg_attr(no_std, no_std)]
|
|
|
|
use std::num::NonZero;
|
|
|
|
fn main() {
|
|
//~^ HELP consider importing this struct
|
|
let _x = NonZero::new(5u32).unwrap();
|
|
//~^ ERROR cannot find type `NonZero`
|
|
}
|
|
|
|
#[allow(dead_code)]
|
|
#[cfg_attr(no_std, panic_handler)]
|
|
fn panic(_info: &core::panic::PanicInfo) -> ! {
|
|
loop {}
|
|
}
|