mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
17 lines
415 B
Rust
17 lines
415 B
Rust
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
|
|
}
|