File tree Expand file tree Collapse file tree
src/tools/rust-analyzer/crates/hir-ty/src/next_solver Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,6 +115,10 @@ impl<'tcx> rustc_type_ir::inherent::Features<TyCtxt<'tcx>> for &'tcx rustc_featu
115115 self . coroutine_clone ( )
116116 }
117117
118+ fn move_trait ( self ) -> bool {
119+ self . move_trait ( )
120+ }
121+
118122 fn feature_bound_holds_in_crate ( self , symbol : Symbol ) -> bool {
119123 // We don't consider feature bounds to hold in the crate when `staged_api` feature is
120124 // enabled, even if it is enabled through `#[feature]`.
Original file line number Diff line number Diff line change @@ -647,6 +647,8 @@ pub trait Features<I: Interner>: Copy {
647647
648648 fn coroutine_clone ( self ) -> bool ;
649649
650+ fn move_trait ( self ) -> bool ;
651+
650652 fn feature_bound_holds_in_crate ( self , symbol : I :: Symbol ) -> bool ;
651653}
652654
Original file line number Diff line number Diff line change @@ -298,7 +298,9 @@ impl<'db> SolverDelegate for SolverContext<'db> {
298298
299299 if trait_pred. polarity ( ) == PredicatePolarity :: Positive {
300300 match self . 0 . interner . as_trait_lang_item ( trait_pred. def_id ( ) ) {
301- Some ( SolverTraitLangItem :: Sized ) | Some ( SolverTraitLangItem :: MetaSized ) => {
301+ Some ( SolverTraitLangItem :: Sized )
302+ | Some ( SolverTraitLangItem :: MetaSized )
303+ | Some ( SolverTraitLangItem :: Move ) => {
302304 let predicate = self . resolve_vars_if_possible ( goal. predicate ) ;
303305 if implicit_fast_path ( self . interner , predicate, goal. param_env ) {
304306 return Some ( Certainty :: Yes ) ;
Original file line number Diff line number Diff line change @@ -659,6 +659,7 @@ pub fn implicit_fast_path<'db>(
659659 Some ( SolverTraitLangItem :: MetaSized ) => SizedTraitKind :: MetaSized ,
660660 // TODO(nia-e): do more comprehensive fast-pathing when the feature is on
661661 Some ( SolverTraitLangItem :: Move ) => return trait_pred. self_ty ( ) . has_trivial_move ( tcx) ,
662+
662663 _ => return false ,
663664 } ;
664665
You can’t perform that action at this time.
0 commit comments