rust/tests/ui/error-codes/E0271.rs

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

12 lines
222 B
Rust
Raw Normal View History

2016-08-05 20:18:01 +00:00
trait Trait { type AssociatedType; }
fn foo<T>(t: T) where T: Trait<AssociatedType=u32> {
println!("in foo");
}
impl Trait for i8 { type AssociatedType = &'static str; }
fn main() {
foo(3_i8); //~ ERROR E0271
}