]> git.proxmox.com Git - rustc.git/blob - src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.rs
New upstream version 1.33.0+dfsg1
[rustc.git] / src / test / ui / feature-gates / feature-gate-default_type_parameter_fallback.rs
1 #![allow(unused)]
2
3 fn avg<T=i32>(_: T) {}
4 //~^ ERROR defaults for type parameters are only allowed
5 //~| WARN this was previously accepted
6
7 struct S<T>(T);
8 impl<T=i32> S<T> {}
9 //~^ ERROR defaults for type parameters are only allowed
10 //~| WARN this was previously accepted
11
12 fn main() {}