mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
18 lines
415 B
Rust
18 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
|
|
}
|