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` ```
19 lines
368 B
Rust
19 lines
368 B
Rust
//@ run-rustfix
|
|
struct Rectangle {
|
|
width: i32,
|
|
height: i32,
|
|
}
|
|
impl Rectangle {
|
|
fn new(width: i32, height: i32) -> Self {
|
|
Self { width, height }
|
|
}
|
|
fn area(&self) -> i32 {
|
|
self.height * self.width
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
let rect = Rectangle::new(3, 4);
|
|
let _ = rect::area();
|
|
//~^ ERROR: cannot find module or crate `rect`
|
|
}
|