Rollup merge of #54623 - alexreg:impl_trait_in_bindings-help, r=estebank

Added help message for `impl_trait_in_bindings` feature gate

r? @estebank

CC @Centril
This commit is contained in:
kennytm 2018-10-01 16:12:59 +08:00 committed by GitHub
commit 5bfd085cd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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