Warn for type parameter defaults on impl blocks

This commit is contained in:
Jeffrey Seyfried 2016-04-08 05:26:50 +00:00
parent 470ca1c3ff
commit 7c73b9eaae
2 changed files with 27 additions and 14 deletions

View file

@ -14,4 +14,10 @@
fn avg<T=i32>(_: T) {}
//~^ ERROR defaults for type parameters are only allowed
//~| WARNING hard error
struct S<T>(T);
impl<T=i32> S<T> {}
//~^ ERROR defaults for type parameters are only allowed
//~| WARNING hard error
fn main() {}