rust/tests/ui/traits/impl-different-num-params.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
232 B
Rust
Raw Normal View History

trait Foo {
fn bar(&self, x: usize) -> Self;
}
impl Foo for isize {
fn bar(&self) -> isize {
//~^ ERROR method `bar` has 1 parameter but the declaration in trait `Foo::bar` has 2
2013-03-14 00:57:30 +00:00
*self
}
}
fn main() {
}