]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.stderr
parser will not give wrong help message for 'public'
[rust.git] / src / test / ui / feature-gates / feature-gate-default_type_parameter_fallback.stderr
1 error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
2   --> $DIR/feature-gate-default_type_parameter_fallback.rs:3:8
3    |
4 LL | fn avg<T=i32>(_: T) {}
5    |        ^^^^^
6    |
7    = note: `#[deny(invalid_type_param_default)]` on by default
8    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
9    = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
10
11 error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
12   --> $DIR/feature-gate-default_type_parameter_fallback.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