From 3ad3bb64d97cb3e6b596f5c29ec87a572037d31a Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Mon, 24 Jul 2023 08:37:40 -0700 Subject: [PATCH] lcnr's suggestions Co-authored-by: lcnr --- compiler/rustc_trait_selection/src/solve/alias_relate.rs | 5 +++-- compiler/rustc_trait_selection/src/solve/mod.rs | 2 +- compiler/rustc_trait_selection/src/solve/weak_types.rs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/compiler/rustc_trait_selection/src/solve/alias_relate.rs b/compiler/rustc_trait_selection/src/solve/alias_relate.rs index c46b4df1125..a751fefc88b 100644 --- a/compiler/rustc_trait_selection/src/solve/alias_relate.rs +++ b/compiler/rustc_trait_selection/src/solve/alias_relate.rs @@ -1,5 +1,6 @@ -//! Implements the `AliasRelate` goal, which is used to unify two aliases in the -//! new solver, which uses "lazy normalization". +//! Implements the `AliasRelate` goal, which is used when unifying aliases. +//! Doing this via a separate goal is called "deferred alias relation" and part +//! of our more general approach to "lazy normalization". //! //! This goal, e.g. `A alias-relate B`, may be satisfied by one of three branches: //! * normalizes-to: If `A` is a projection, we can prove the equivalent diff --git a/compiler/rustc_trait_selection/src/solve/mod.rs b/compiler/rustc_trait_selection/src/solve/mod.rs index cc59dd5df03..63e48c94a86 100644 --- a/compiler/rustc_trait_selection/src/solve/mod.rs +++ b/compiler/rustc_trait_selection/src/solve/mod.rs @@ -3,7 +3,7 @@ //! As a user of rust, you can use `-Ztrait-solver=next` or `next-coherence` //! to enable the new trait solver always, or just within coherence, respectively. //! -//! As a developer of rustc, you probably shouldn't be using the new trait +//! As a developer of rustc, you shouldn't be using the new trait //! solver without asking the trait-system-refactor-initiative, but it can //! be enabled with `InferCtxtBuilder::with_next_trait_solver`. This will //! ensure that trait solving using that inference context will be routed diff --git a/compiler/rustc_trait_selection/src/solve/weak_types.rs b/compiler/rustc_trait_selection/src/solve/weak_types.rs index fea634a2ad2..54de32cf618 100644 --- a/compiler/rustc_trait_selection/src/solve/weak_types.rs +++ b/compiler/rustc_trait_selection/src/solve/weak_types.rs @@ -2,7 +2,7 @@ //! `#![feature(lazy_type_alias)]` and `#![feature(type_alias_impl_trait)]`. //! //! Since a weak alias is not ambiguous, this just computes the `type_of` of -//! the alias and registers any where-clause predicates on the type alias. +//! the alias and registers the where-clauses of the type alias. use rustc_middle::traits::solve::{Certainty, Goal, QueryResult}; use rustc_middle::ty;