]>
Commit | Line | Data |
---|---|---|
487cf647 FG |
1 | // run-rustfix |
2 | struct Rectangle { | |
3 | width: i32, | |
4 | height: i32, | |
5 | } | |
6 | impl Rectangle { | |
7 | fn new(width: i32, height: i32) -> Self { | |
8 | Self { width, height } | |
9 | } | |
10 | fn area(&self) -> i32 { | |
11 | self.height * self.width | |
12 | } | |
13 | } | |
14 | ||
15 | fn main() { | |
16 | let rect = Rectangle::new(3, 4); | |
17 | let _ = rect::area(); | |
18 | //~^ ERROR failed to resolve: use of undeclared crate or module `rect` | |
19 | } |