File tree Expand file tree Collapse file tree 1 file changed +1
-17
lines changed
compiler/rustc_typeck/src/check Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -126,24 +126,8 @@ impl Inherited<'a, 'tcx> {
126126 }
127127 }
128128
129- #[ instrument( level = "debug" , skip( self ) ) ]
130- fn transform_predicate ( & self , p : & mut ty:: Predicate < ' tcx > ) {
131- // Don't transform non-const bounds into const bounds,
132- // but transform const bounds to non-const when we are
133- // not in a const context.
134- if let hir:: Constness :: NotConst = self . constness {
135- let kind = p. kind ( ) ;
136- if let ty:: PredicateKind :: Trait ( pred) = kind. as_ref ( ) . skip_binder ( ) {
137- let mut pred = * pred;
138- pred. constness = hir:: Constness :: NotConst ;
139- * p = kind. rebind ( ty:: PredicateKind :: Trait ( pred) ) . to_predicate ( self . tcx ) ;
140- }
141- }
142- }
143-
144- pub ( super ) fn register_predicate ( & self , mut obligation : traits:: PredicateObligation < ' tcx > ) {
129+ pub ( super ) fn register_predicate ( & self , obligation : traits:: PredicateObligation < ' tcx > ) {
145130 debug ! ( "register_predicate({:?})" , obligation) ;
146- self . transform_predicate ( & mut obligation. predicate ) ;
147131 if obligation. has_escaping_bound_vars ( ) {
148132 span_bug ! ( obligation. cause. span, "escaping bound vars in predicate {:?}" , obligation) ;
149133 }
You can’t perform that action at this time.
0 commit comments