summaryrefslogtreecommitdiffstats
path: root/tests/ui/feature-gates/feature-gate-return_position_impl_trait_in_trait.stderr
blob: aeabed4a6ab66d550f9e1ed82f852eabbcb88d4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in trait method return
  --> $DIR/feature-gate-return_position_impl_trait_in_trait.rs:8:17
   |
LL |     fn bar() -> impl Sized;
   |                 ^^^^^^^^^^
   |
   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
   = help: add `#![feature(return_position_impl_trait_in_trait)]` to the crate attributes to enable

error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in trait method return
  --> $DIR/feature-gate-return_position_impl_trait_in_trait.rs:9:21
   |
LL |     fn baz() -> Box<impl std::fmt::Display>;
   |                     ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
   = help: add `#![feature(return_position_impl_trait_in_trait)]` to the crate attributes to enable

error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in trait method return
  --> $DIR/feature-gate-return_position_impl_trait_in_trait.rs:15:23
   |
LL |     async fn bar() -> impl Sized;
   |                       ^^^^^^^^^^
   |
   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
   = help: add `#![feature(return_position_impl_trait_in_trait)]` to the crate attributes to enable

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0562`.