File tree 2 files changed +28
-0
lines changed
tests/ui/impl-trait/in-trait
2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ // check-pass
2
+
3
+ // This didn't work in the previous default RPITIT method hack attempt
4
+
5
+ #![ feature( return_position_impl_trait_in_trait) ]
6
+ //~^ WARN the feature `return_position_impl_trait_in_trait` is incomplete
7
+
8
+ trait Foo {
9
+ fn bar ( x : bool ) -> impl Sized {
10
+ if x {
11
+ let _: u32 = Self :: bar ( !x) ;
12
+ }
13
+ Default :: default ( )
14
+ }
15
+ }
16
+
17
+ fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ warning: the feature `return_position_impl_trait_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
2
+ --> $DIR/default-method-constraint.rs:5:12
3
+ |
4
+ LL | #![feature(return_position_impl_trait_in_trait)]
5
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
+ |
7
+ = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
8
+ = note: `#[warn(incomplete_features)]` on by default
9
+
10
+ warning: 1 warning emitted
11
+
You can’t perform that action at this time.
0 commit comments