From c805e817a93a641ef92e58900bc5b0876bbf51f1 Mon Sep 17 00:00:00 2001 From: scalexm Date: Thu, 29 Nov 2018 20:29:50 +0100 Subject: [PATCH] Fix doc comments --- src/librustc/infer/nll_relate/mod.rs | 10 +++++----- .../borrow_check/nll/type_check/relate_tys.rs | 2 +- 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 ff79c38680f2..ce5aee81ef9d 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 9924b0338713..225e2841fb0a 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 {