]> git.lizzy.rs Git - rust.git/commitdiff
remove outdated comment
authorlcnr <rust@lcnr.de>
Tue, 12 Jul 2022 13:29:32 +0000 (15:29 +0200)
committerlcnr <rust@lcnr.de>
Tue, 12 Jul 2022 13:29:32 +0000 (15:29 +0200)
compiler/rustc_trait_selection/src/traits/query/type_op/mod.rs

index f4733c9bab2779855e5e6250940359cb6e99ec48..578e1d00cf9ef406ec4520f20555aa8f7a0c7297 100644 (file)
@@ -155,14 +155,14 @@ fn fully_perform(self, infcx: &InferCtxt<'_, 'tcx>) -> Fallible<TypeOpOutput<'tc
             }
         }
 
-        // Promote the final query-region-constraints into a
-        // (optional) ref-counted vector:
-        let region_constraints = if region_constraints.is_empty() {
-            None
-        } else {
-            Some(&*infcx.tcx.arena.alloc(region_constraints))
-        };
-
-        Ok(TypeOpOutput { output, constraints: region_constraints, error_info })
+        Ok(TypeOpOutput {
+            output,
+            constraints: if region_constraints.is_empty() {
+                None
+            } else {
+                Some(infcx.tcx.arena.alloc(region_constraints))
+            },
+            error_info,
+        })
     }
 }