rust/tests/ui/span/missing-unit-argument.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
415 B
Rust
Raw Normal View History

fn foo(():(), ():()) {}
fn bar(():()) {}
2017-10-08 20:13:37 -05:00
struct S;
impl S {
fn baz(self, (): ()) { }
fn generic<T>(self, _: T) { }
}
fn main() {
let _: Result<(), String> = Ok(); //~ ERROR this enum variant takes
foo(); //~ ERROR function takes
foo(()); //~ ERROR function takes
bar(); //~ ERROR function takes
S.baz(); //~ ERROR this method takes
S.generic::<()>(); //~ ERROR this method takes
}