diff options
Diffstat (limited to 'tests/ui/resolve/issue-101749.fixed')
-rw-r--r-- | tests/ui/resolve/issue-101749.fixed | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/resolve/issue-101749.fixed b/tests/ui/resolve/issue-101749.fixed new file mode 100644 index 000000000..3e5544296 --- /dev/null +++ b/tests/ui/resolve/issue-101749.fixed @@ -0,0 +1,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` +} |