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