2017-08-23 08:40:05 -05:00
|
|
|
fn foo(():(), ():()) {}
|
|
|
|
fn bar(():()) {}
|
|
|
|
|
2017-10-08 20:13:37 -05:00
|
|
|
struct S;
|
|
|
|
impl S {
|
|
|
|
fn baz(self, (): ()) { }
|
|
|
|
fn generic<T>(self, _: T) { }
|
|
|
|
}
|
|
|
|
|
2017-08-23 08:40:05 -05:00
|
|
|
fn main() {
|
2021-06-20 12:48:37 -05:00
|
|
|
let _: Result<(), String> = Ok(); //~ ERROR this enum variant takes
|
2023-01-04 21:02:10 -06:00
|
|
|
foo(); //~ ERROR function takes
|
|
|
|
foo(()); //~ ERROR function takes
|
|
|
|
bar(); //~ ERROR function takes
|
|
|
|
S.baz(); //~ ERROR this method takes
|
|
|
|
S.generic::<()>(); //~ ERROR this method takes
|
2017-08-23 08:40:05 -05:00
|
|
|
}
|