]> git.lizzy.rs Git - rust.git/blob - src/test/ui/resolve/suggest-path-for-tuple-struct.rs
Auto merge of #100251 - compiler-errors:tuple-trait-2, r=jackh726
[rust.git] / src / test / ui / resolve / suggest-path-for-tuple-struct.rs
1 mod module {
2     pub struct SomeTupleStruct(u8);
3     pub struct SomeRegularStruct {
4         foo: u8
5     }
6
7     impl SomeTupleStruct {
8         pub fn new() -> Self {
9             Self(0)
10         }
11     }
12     impl SomeRegularStruct {
13         pub fn new() -> Self {
14             Self { foo: 0 }
15         }
16     }
17 }
18
19 use module::{SomeTupleStruct, SomeRegularStruct};
20
21 fn main() {
22     let _ = SomeTupleStruct.new();
23     //~^ ERROR expected value, found struct `SomeTupleStruct`
24     let _ = SomeRegularStruct.new();
25     //~^ ERROR expected value, found struct `SomeRegularStruct`
26 }