]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/missing-unit-argument.rs
Auto merge of #98051 - davidtwco:split-dwarf-stabilization, r=wesleywiser
[rust.git] / src / test / ui / span / missing-unit-argument.rs
1 fn foo(():(), ():()) {}
2 fn bar(():()) {}
3
4 struct S;
5 impl S {
6     fn baz(self, (): ()) { }
7     fn generic<T>(self, _: T) { }
8 }
9
10 fn main() {
11     let _: Result<(), String> = Ok(); //~ ERROR this enum variant takes
12     foo(); //~ ERROR this function takes
13     foo(()); //~ ERROR this function takes
14     bar(); //~ ERROR this function takes
15     S.baz(); //~ ERROR this function takes
16     S.generic::<()>(); //~ ERROR this function takes
17 }