blob: 3244ad7a03139a43d720d3749d1909161bea8005 [file] [log] [blame]
//@ 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 failed to resolve: use of unresolved module or unlinked crate `rect`
}