]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gates/feature-gate-return_position_impl_trait_in_trait.stderr
Auto merge of #89123 - the8472:push_in_capacity, r=amanieu
[rust.git] / src / test / ui / feature-gates / feature-gate-return_position_impl_trait_in_trait.stderr
1 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in trait method return
2   --> $DIR/feature-gate-return_position_impl_trait_in_trait.rs:8:17
3    |
4 LL |     fn bar() -> impl Sized;
5    |                 ^^^^^^^^^^
6    |
7    = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
8    = help: add `#![feature(return_position_impl_trait_in_trait)]` to the crate attributes to enable
9
10 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in trait method return
11   --> $DIR/feature-gate-return_position_impl_trait_in_trait.rs:9:21
12    |
13 LL |     fn baz() -> Box<impl std::fmt::Display>;
14    |                     ^^^^^^^^^^^^^^^^^^^^^^
15    |
16    = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
17    = help: add `#![feature(return_position_impl_trait_in_trait)]` to the crate attributes to enable
18
19 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in trait method return
20   --> $DIR/feature-gate-return_position_impl_trait_in_trait.rs:15:23
21    |
22 LL |     async fn bar() -> impl Sized;
23    |                       ^^^^^^^^^^
24    |
25    = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
26    = help: add `#![feature(return_position_impl_trait_in_trait)]` to the crate attributes to enable
27
28 error: aborting due to 3 previous errors
29
30 For more information about this error, try `rustc --explain E0562`.