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