]> git.lizzy.rs Git - rust.git/blob - tests/ui/span/missing-unit-argument.rs
Rollup merge of #106441 - mllken:abstract-socket-noref, r=joshtriplett
[rust.git] / tests / 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 function takes
13     foo(()); //~ ERROR function takes
14     bar(); //~ ERROR function takes
15     S.baz(); //~ ERROR this method takes
16     S.generic::<()>(); //~ ERROR this method takes
17 }