2017-08-23 15:40:05 +02:00
|
|
|
fn foo(():(), ():()) {}
|
|
|
|
fn bar(():()) {}
|
|
|
|
|
2017-10-08 18:13:37 -07:00
|
|
|
struct S;
|
|
|
|
impl S {
|
|
|
|
fn baz(self, (): ()) { }
|
|
|
|
fn generic<T>(self, _: T) { }
|
|
|
|
}
|
|
|
|
|
2017-08-23 15:40:05 +02:00
|
|
|
fn main() {
|
2021-06-20 13:48:37 -04:00
|
|
|
let _: Result<(), String> = Ok(); //~ ERROR this enum variant takes
|
2023-01-05 03:02:10 +00: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 15:40:05 +02:00
|
|
|
}
|