]> git.lizzy.rs Git - rust.git/blob - tests/ui/resolve/issue-101749.fixed
Rollup merge of #106692 - eggyal:mv-binary_heap.rs-binary_heap/mod.rs, r=Mark-Simulacrum
[rust.git] / tests / ui / resolve / issue-101749.fixed
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 }