about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2020-11-26 07:59:51 -0500
committerJoshua Nelson <jyn514@gmail.com>2020-11-26 07:59:51 -0500
commit277bdbc0ed0f1f87e8d340233d7f485fbbe8cc66 (patch)
tree5a370345397de585e6154386f312e7d59db1fcc0
parent6278daac540ad4ef69ca0828a1a660671da539b9 (diff)
downloadrust-277bdbc0ed0f1f87e8d340233d7f485fbbe8cc66.tar.gz
rust-277bdbc0ed0f1f87e8d340233d7f485fbbe8cc66.zip
Remove redundant `lift_to_tcx`
... and fix some fuzzy wording in the debug logging.
-rw-r--r--src/librustdoc/clean/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs
index 250922e5aa9..ea34085823f 100644
--- a/src/librustdoc/clean/mod.rs
+++ b/src/librustdoc/clean/mod.rs
@@ -1503,7 +1503,7 @@ impl Clean<Type> for hir::Ty<'_> {
 }
 
 /// Returns `None` if the type could not be normalized
-fn normalize(cx: &DocContext<'tcx>, ty: Ty<'tcx>) -> Option<Ty<'tcx>> {
+fn normalize(cx: &DocContext<'tcx>, ty: Ty<'_>) -> Option<Ty<'tcx>> {
     use crate::rustc_trait_selection::infer::TyCtxtInferExt;
     use crate::rustc_trait_selection::traits::query::normalize::AtExt;
     use rustc_middle::traits::ObligationCause;
@@ -1518,11 +1518,11 @@ fn normalize(cx: &DocContext<'tcx>, ty: Ty<'tcx>) -> Option<Ty<'tcx>> {
     });
     match normalized {
         Ok(normalized_value) => {
-            debug!("resolved {:?} to {:?}", ty, normalized_value);
+            debug!("normalized {:?} to {:?}", ty, normalized_value);
             Some(normalized_value)
         }
         Err(err) => {
-            debug!("failed to resolve {:?}: {:?}", ty, err);
+            debug!("failed to normalize {:?}: {:?}", ty, err);
             None
         }
     }
@@ -1531,7 +1531,7 @@ fn normalize(cx: &DocContext<'tcx>, ty: Ty<'tcx>) -> Option<Ty<'tcx>> {
 impl<'tcx> Clean<Type> for Ty<'tcx> {
     fn clean(&self, cx: &DocContext<'_>) -> Type {
         debug!("cleaning type: {:?}", self);
-        let ty = normalize(cx, self.lift_to_tcx(cx.tcx).unwrap()).unwrap_or(self);
+        let ty = normalize(cx, self).unwrap_or(self);
         match *ty.kind() {
             ty::Never => Never,
             ty::Bool => Primitive(PrimitiveType::Bool),