diff options
| author | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-04-08 05:26:50 +0000 |
|---|---|---|
| committer | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-04-08 05:31:06 +0000 |
| commit | 7c73b9eaae24b7045c85af4b95fc0e32e67efbf2 (patch) | |
| tree | a98926869a4312a7f281e3c8f9318126b3f26731 /src/test | |
| parent | 470ca1c3ff33cd046f71a5453f8f520da4cd387e (diff) | |
| download | rust-7c73b9eaae24b7045c85af4b95fc0e32e67efbf2.tar.gz rust-7c73b9eaae24b7045c85af4b95fc0e32e67efbf2.zip | |
Warn for type parameter defaults on impl blocks
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/type-parameter-invalid-lint.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/compile-fail/type-parameter-invalid-lint.rs b/src/test/compile-fail/type-parameter-invalid-lint.rs index 9291329fac3..b99ef925804 100644 --- a/src/test/compile-fail/type-parameter-invalid-lint.rs +++ b/src/test/compile-fail/type-parameter-invalid-lint.rs @@ -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() {} |
