I hit some more unexpected behavior with default_type_params which is probably just a bad error message.
Code
#![feature(default_type_params)]
pub trait Foo<A, B = ()> {}
pub struct Wrap<F> {
foo: F,
}
impl<A: Send, F: Foo<A>> Wrap<F> {
fn stuff(&self) {
}
}
struct MyFoo;
impl Foo<uint, uint> for MyFoo {}
pub fn main() {
let w = Wrap { foo: MyFoo };
w.stuff();
}
Output
rustc repro2.rs
repro2.rs:20:7: 20:14 error: type `Wrap<MyFoo>` does not implement any method in scope named `stuff`
repro2.rs:20 w.stuff();
^~~~~~~
error: aborting due to previous error