Added help message for impl_trait_in_bindings feature gate.

This commit is contained in:
Alexander Regueiro 2018-09-27 22:34:19 +01:00
parent 390540909e
commit 3e142b92bc
3 changed files with 88 additions and 56 deletions

View file

@ -9,12 +9,16 @@ error[E0562]: `impl Trait` not allowed outside of function and inherent method r
|
LL | const FOO: impl Copy = 42;
| ^^^^^^^^^
|
= help: add #![feature(impl_trait_in_bindings)] to the crate attributes to enable
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
--> $DIR/feature-gate-impl_trait_in_bindings.rs:13:13
|
LL | static BAR: impl Copy = 42;
| ^^^^^^^^^
|
= help: add #![feature(impl_trait_in_bindings)] to the crate attributes to enable
error: aborting due to 3 previous errors

View file

@ -231,6 +231,8 @@ error[E0562]: `impl Trait` not allowed outside of function and inherent method r
|
LL | let _in_local_variable: impl Fn() = || {};
| ^^^^^^^^^
|
= help: add #![feature(impl_trait_in_bindings)] to the crate attributes to enable
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
--> $DIR/where-allowed.rs:232:46