rust/src/test/compile-fail/issue-2611-4.rs

18 lines
342 B
Rust
Raw Normal View History

// Tests that an impl method's bounds aren't *more* restrictive
// than the trait method it's implementing
import iter;
import iter::BaseIter;
trait A {
fn b<C:copy, D>(x: C) -> C;
}
struct E {
f: int;
}
impl E: A {
fn b<F:copy const, G>(_x: F) -> F { fail } //~ ERROR in method `b`, type parameter 0 has 2 bounds, but
}
fn main() {}