Auto merge of #32817 - jseyfried:warn_impl_param_defaults, r=nikomatsakis
Warn for type parameter defaults on impl blocks Warn for type parameter defaults on impl blocks (fixes #31543). r? @nikomatsakis
This commit is contained in:
commit
6136a86291
2 changed files with 27 additions and 14 deletions
|
|
@ -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() {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue