summaryrefslogtreecommitdiffstats
path: root/tests/ui/feature-gates/feature-gate-default_type_parameter_fallback.rs
blob: 33038e24bc62b7b142446d9db2c25894edee4e78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#![allow(unused)]

fn avg<T=i32>(_: T) {}
//~^ ERROR defaults for type parameters are only allowed
//~| WARN this was previously accepted

struct S<T>(T);
impl<T=i32> S<T> {}
//~^ ERROR defaults for type parameters are only allowed
//~| WARN this was previously accepted

fn main() {}