summaryrefslogtreecommitdiffstats
path: root/src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.stderr')
-rw-r--r--src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.stderr21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.stderr b/src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.stderr
new file mode 100644
index 000000000..a7d5c7ac3
--- /dev/null
+++ b/src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.stderr
@@ -0,0 +1,21 @@
+error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+ --> $DIR/feature-gate-default_type_parameter_fallback.rs:3:8
+ |
+LL | fn avg<T=i32>(_: T) {}
+ | ^^^^^
+ |
+ = note: `#[deny(invalid_type_param_default)]` on by default
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+ = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
+
+error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+ --> $DIR/feature-gate-default_type_parameter_fallback.rs:8:6
+ |
+LL | impl<T=i32> S<T> {}
+ | ^^^^^
+ |
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+ = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
+
+error: aborting due to 2 previous errors
+