|
| 1 | +error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions |
| 2 | + --> $DIR/default_type_parameter_in_fn_or_impl.rs:3:8 |
| 3 | + | |
| 4 | +LL | fn avg<T=i32>(_: T) {} |
| 5 | + | ^^^^^ |
| 6 | + | |
| 7 | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| 8 | + = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887> |
| 9 | + = note: `#[deny(invalid_type_param_default)]` on by default |
| 10 | + |
| 11 | +error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions |
| 12 | + --> $DIR/default_type_parameter_in_fn_or_impl.rs:8:6 |
| 13 | + | |
| 14 | +LL | impl<T=i32> S<T> {} |
| 15 | + | ^^^^^ |
| 16 | + | |
| 17 | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| 18 | + = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887> |
| 19 | + |
| 20 | +error: aborting due to 2 previous errors |
| 21 | + |
| 22 | +Future incompatibility report: Future breakage diagnostic: |
| 23 | +error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions |
| 24 | + --> $DIR/default_type_parameter_in_fn_or_impl.rs:3:8 |
| 25 | + | |
| 26 | +LL | fn avg<T=i32>(_: T) {} |
| 27 | + | ^^^^^ |
| 28 | + | |
| 29 | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| 30 | + = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887> |
| 31 | + = note: `#[deny(invalid_type_param_default)]` on by default |
| 32 | + |
| 33 | +Future breakage diagnostic: |
| 34 | +error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions |
| 35 | + --> $DIR/default_type_parameter_in_fn_or_impl.rs:8:6 |
| 36 | + | |
| 37 | +LL | impl<T=i32> S<T> {} |
| 38 | + | ^^^^^ |
| 39 | + | |
| 40 | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| 41 | + = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887> |
| 42 | + = note: `#[deny(invalid_type_param_default)]` on by default |
| 43 | + |
0 commit comments