]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.rs
Merge commit '35d9c6bf256968e1b40e0d554607928bdf9cebea' into sync_cg_clif-2022-02-23
[rust.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() {}