File tree Expand file tree Collapse file tree 3 files changed +22
-1
lines changed
compiler/rustc_hir_typeck/src Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ pub(super) fn check_fn<'a, 'tcx>(
100100
101101 inherited. typeck_results . borrow_mut ( ) . liberated_fn_sigs_mut ( ) . insert ( fn_id, fn_sig) ;
102102
103- if let ty:: Dynamic ( .. ) = declared_ret_ty. kind ( ) {
103+ if let ty:: Dynamic ( _ , _ , ty :: Dyn ) = declared_ret_ty. kind ( ) {
104104 // FIXME: We need to verify that the return type is `Sized` after the return expression has
105105 // been evaluated so that we have types available for all the nodes being returned, but that
106106 // requires the coerced evaluated type to be stored. Moving `check_return_expr` before this
Original file line number Diff line number Diff line change 1+ // check-pass
2+
3+ #![ feature( dyn_star) ]
4+ //~^ WARN the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes
5+
6+ fn _foo ( ) -> dyn * Unpin {
7+ 4usize
8+ }
9+
10+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ warning: the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes
2+ --> $DIR/return.rs:3:12
3+ |
4+ LL | #![feature(dyn_star)]
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