summaryrefslogtreecommitdiffstats
path: root/tests/ui/span/missing-unit-argument.rs
blob: db96ae223d92b941884b6a321f03609d206358fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fn foo(():(), ():()) {}
fn bar(():()) {}

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
}