]> git.lizzy.rs Git - rust.git/blob - tests/ui/feature-gates/feature-gate-default_type_parameter_fallback.rs
Rollup merge of #106641 - chenyukang:yukang/fix-105761-segguest-this, r=estebank
[rust.git] / tests / 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() {}