]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/missing-unit-argument.rs
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[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 }