]> git.lizzy.rs Git - rust.git/blob - tests/ui/resolve/issue-101749-2.rs
Rollup merge of #106766 - GuillaumeGomez:rm-stripper-dead-code, r=notriddle
[rust.git] / tests / ui / resolve / issue-101749-2.rs
1 struct Rectangle {
2     width: i32,
3     height: i32,
4 }
5 impl Rectangle {
6     fn new(width: i32, height: i32) -> Self {
7         Self { width, height }
8     }
9 }
10
11 fn main() {
12     let rect = Rectangle::new(3, 4);
13     // `area` is not implemented for `Rectangle`, so this should not suggest
14     let _ = rect::area();
15     //~^ ERROR failed to resolve: use of undeclared crate or module `rect`
16 }