@@ -763,33 +763,16 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
763763 // the trait into the concrete method, and uses that for const stability
764764 // checks.
765765 // FIXME(effects) we might consider moving const stability checks to typeck as well.
766- if tcx. features ( ) . effects {
767- is_trait = true ;
766+ is_trait = true ;
768767
769- if let Ok ( Some ( instance) ) =
770- Instance :: resolve ( tcx, param_env, callee, fn_args)
771- && let InstanceDef :: Item ( def) = instance. def
772- {
773- // Resolve a trait method call to its concrete implementation, which may be in a
774- // `const` trait impl. This is only used for the const stability check below, since
775- // we want to look at the concrete impl's stability.
776- fn_args = instance. args ;
777- callee = def;
778- }
779- } else {
780- self . check_op ( ops:: FnCallNonConst {
781- caller,
782- callee,
783- args : fn_args,
784- span : * fn_span,
785- call_source : * call_source,
786- feature : Some ( if tcx. features ( ) . const_trait_impl {
787- sym:: effects
788- } else {
789- sym:: const_trait_impl
790- } ) ,
791- } ) ;
792- return ;
768+ if let Ok ( Some ( instance) ) = Instance :: resolve ( tcx, param_env, callee, fn_args)
769+ && let InstanceDef :: Item ( def) = instance. def
770+ {
771+ // Resolve a trait method call to its concrete implementation, which may be in a
772+ // `const` trait impl. This is only used for the const stability check below, since
773+ // we want to look at the concrete impl's stability.
774+ fn_args = instance. args ;
775+ callee = def;
793776 }
794777 }
795778
0 commit comments