about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc/infer/nll_relate/mod.rs10
-rw-r--r--src/librustc_mir/borrow_check/nll/type_check/relate_tys.rs2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/librustc/infer/nll_relate/mod.rs b/src/librustc/infer/nll_relate/mod.rs
index ff79c38680f..ce5aee81ef9 100644
--- a/src/librustc/infer/nll_relate/mod.rs
+++ b/src/librustc/infer/nll_relate/mod.rs
@@ -16,15 +16,15 @@
 //! Here are the key differences:
 //!
 //! - This code may choose to bypass some checks (e.g. the occurs check)
-//!   in case we know that there are no unbound type inference variables.
-//!   This is the case for NLL, because at NLL time types are fully inferred
-//!   up-to regions.
+//!   in the case where we know that there are no unbound type inference
+//!   variables. This is the case for NLL, because at NLL time types are fully
+//!   inferred up-to regions.
 //! - This code uses "universes" to handle higher-ranked regions and
 //!   not the leak-check. This is "more correct" than what rustc does
 //!   and we are generally migrating in this direction, but NLL had to
 //!   get there first.
 //!
-//! Also, this code assumes that there are no bound type vars at all, not even
+//! Also, this code assumes that there are no bound types at all, not even
 //! free ones. This is ok because:
 //! - we are not relating anything quantified over some type variable
 //! - we will have instantiated all the bound type vars already (the one
@@ -265,7 +265,7 @@ where
     }
 
     /// Relate a projection type and some value type lazily. This will always
-    /// succeed, but we are pushing an additional `ProjectionEq` goal depending
+    /// succeed, but we push an additional `ProjectionEq` goal depending
     /// on the value type:
     /// - if the value type is any type `T` which is not a projection, we push
     ///   `ProjectionEq(projection = T)`.
diff --git a/src/librustc_mir/borrow_check/nll/type_check/relate_tys.rs b/src/librustc_mir/borrow_check/nll/type_check/relate_tys.rs
index 9924b033871..225e2841fb0 100644
--- a/src/librustc_mir/borrow_check/nll/type_check/relate_tys.rs
+++ b/src/librustc_mir/borrow_check/nll/type_check/relate_tys.rs
@@ -118,7 +118,7 @@ impl TypeRelatingDelegate<'tcx> for NllTypeRelatingDelegate<'_, '_, '_, 'tcx> {
     }
 
     fn push_domain_goal(&mut self, _: DomainGoal<'tcx>) {
-        // No-op
+        bug!("should never be invoked with eager normalization")
     }
 
     fn normalization() -> NormalizationStrategy {