diff --git a/compiler/rustc_next_trait_solver/src/placeholder.rs b/compiler/rustc_next_trait_solver/src/placeholder.rs index 31fce0601697b..83f3bdf01dc83 100644 --- a/compiler/rustc_next_trait_solver/src/placeholder.rs +++ b/compiler/rustc_next_trait_solver/src/placeholder.rs @@ -32,8 +32,10 @@ where Infcx: InferCtxtLike, I: Interner, { - /// Returns `Some` if we *were* able to replace bound vars. If there are any bound vars that - /// use a binding level above `universe_indices.len()`, we fail. + /// Returns a type with all bound vars replaced by placeholders, + /// together with mappings from the new placeholders back to the original variable. + /// + /// Panics if there are any bound vars that use a binding level above `universe_indices.len()`. pub fn replace_bound_vars>( infcx: &'a Infcx, universe_indices: &'a mut Vec>, diff --git a/compiler/rustc_next_trait_solver/src/solve/mod.rs b/compiler/rustc_next_trait_solver/src/solve/mod.rs index 52a1479d70a15..58bd7cf663d98 100644 --- a/compiler/rustc_next_trait_solver/src/solve/mod.rs +++ b/compiler/rustc_next_trait_solver/src/solve/mod.rs @@ -39,9 +39,9 @@ use crate::solve::assembly::Candidate; /// /// We previously used `cx.recursion_limit().0.checked_ilog2().unwrap_or(0)` for this. /// However, it feels unlikely that uncreasing the recursion limit by a power of two -/// to get one more iteration is every useful or desirable. We now instead used a constant +/// to get one more iteration is ever useful or desirable. We now instead used a constant /// here. If there ever ends up some use-cases where a bigger number of fixpoint iterations -/// is required, we can add a new attribute for that or revert this to be dependant on the +/// is required, we can add a new attribute for that or revert this to be dependent on the /// recursion limit again. However, this feels very unlikely. const FIXPOINT_STEP_LIMIT: usize = 8;