summaryrefslogtreecommitdiffstats
path: root/src/test/ui/resolve/issue-101749-2.rs
blob: 4d3d469447c2b9b20519bc079c1e32f6cf5ed7c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
struct Rectangle {
    width: i32,
    height: i32,
}
impl Rectangle {
    fn new(width: i32, height: i32) -> Self {
        Self { width, height }
    }
}

fn main() {
    let rect = Rectangle::new(3, 4);
    // `area` is not implemented for `Rectangle`, so this should not suggest
    let _ = rect::area();
    //~^ ERROR failed to resolve: use of undeclared crate or module `rect`
}