diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-12-08 12:57:31 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-08 12:57:31 +0100 |
| commit | 2fbde2b028126f20fbf4dbca58a7cdbd7f93a456 (patch) | |
| tree | 67d8a799c9e86c79edfa2dc8a624675c8fbec350 /src/test | |
| parent | 4d5a2f3d81ed3d36bef505258149bcee1be1394b (diff) | |
| parent | e9dd59131bc02986ec17f88307e1b0ae252dc5ad (diff) | |
| download | rust-2fbde2b028126f20fbf4dbca58a7cdbd7f93a456.tar.gz rust-2fbde2b028126f20fbf4dbca58a7cdbd7f93a456.zip | |
Rollup merge of #105408 - cuviper:help-rpitirpit, r=compiler-errors
Add help for `#![feature(impl_trait_in_fn_trait_return)]` This adds a new variant `ImplTraitContext::FeatureGated`, so we can generalize the help for `return_position_impl_trait_in_trait` to also work for `impl_trait_in_fn_trait_return`. cc #99697
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.stderr | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.stderr b/src/test/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.stderr index c485bc5c3ab..760dcb615c8 100644 --- a/src/test/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.stderr +++ b/src/test/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.stderr @@ -3,12 +3,18 @@ error[E0562]: `impl Trait` only allowed in function and inherent method return t | LL | fn f() -> impl Fn() -> impl Sized { || () } | ^^^^^^^^^^ + | + = note: see issue #99697 <https://github.com/rust-lang/rust/issues/99697> for more information + = help: add `#![feature(impl_trait_in_fn_trait_return)]` to the crate attributes to enable error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return --> $DIR/feature-gate-impl_trait_in_fn_trait_return.rs:3:32 | LL | fn g() -> &'static dyn Fn() -> impl Sized { &|| () } | ^^^^^^^^^^ + | + = note: see issue #99697 <https://github.com/rust-lang/rust/issues/99697> for more information + = help: add `#![feature(impl_trait_in_fn_trait_return)]` to the crate attributes to enable error: aborting due to 2 previous errors |
