summaryrefslogtreecommitdiffstats
path: root/tests/ui/resolve/issue-101749.fixed
blob: 3e5544296e462f4653e24aa8c5b88359a46bf874 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// 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 undeclared crate or module `rect`
}