diff options
| author | bors <bors@rust-lang.org> | 2023-12-07 08:00:12 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-12-07 08:00:12 +0000 |
| commit | f90f898fa53de89a1cb274442c90c410075ae731 (patch) | |
| tree | 241655c4903cb929f8d1af70c6af15563eb685f2 /compiler/rustc_trait_selection | |
| parent | 568f6a8641e391ffcdcdb03e79d0901731d8d399 (diff) | |
| parent | d732c3b756534540ea9c4e85ea24eba7c57c7d2f (diff) | |
| download | rust-f90f898fa53de89a1cb274442c90c410075ae731.tar.gz rust-f90f898fa53de89a1cb274442c90c410075ae731.zip | |
Auto merge of #118685 - compiler-errors:stack-dependent, r=lcnr
`EvaluatedToUnknown` -> `EvaluatedToAmbigStackDependent`, `EvaluatedToRecur` -> `EvaluatedToErrStackDependent` Less confusing names, since the only difference between them and their parallel `EvalutedTo..` is that they are stack dependent. r? lcnr
Diffstat (limited to 'compiler/rustc_trait_selection')
| -rw-r--r-- | compiler/rustc_trait_selection/src/infer.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/select/mod.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_trait_selection/src/infer.rs b/compiler/rustc_trait_selection/src/infer.rs index 992bfd97e0e..4b11cc3ace9 100644 --- a/compiler/rustc_trait_selection/src/infer.rs +++ b/compiler/rustc_trait_selection/src/infer.rs @@ -29,7 +29,7 @@ pub trait InferCtxtExt<'tcx> { /// - the parameter environment /// /// Invokes `evaluate_obligation`, so in the event that evaluating - /// `Ty: Trait` causes overflow, EvaluatedToRecur (or EvaluatedToUnknown) + /// `Ty: Trait` causes overflow, EvaluatedToErrStackDependent (or EvaluatedToAmbigStackDependent) /// will be returned. fn type_implements_trait( &self, diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs index 8e4f7d5d965..0d3ec41f511 100644 --- a/compiler/rustc_trait_selection/src/traits/select/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs @@ -222,8 +222,8 @@ pub enum TreatInductiveCycleAs { impl From<TreatInductiveCycleAs> for EvaluationResult { fn from(treat: TreatInductiveCycleAs) -> EvaluationResult { match treat { - TreatInductiveCycleAs::Ambig => EvaluatedToUnknown, - TreatInductiveCycleAs::Recur => EvaluatedToRecur, + TreatInductiveCycleAs::Ambig => EvaluatedToAmbigStackDependent, + TreatInductiveCycleAs::Recur => EvaluatedToErrStackDependent, } } } @@ -1231,7 +1231,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { }) { debug!("evaluate_stack --> unbound argument, recursive --> giving up",); - return Ok(EvaluatedToUnknown); + return Ok(EvaluatedToAmbigStackDependent); } match self.candidate_from_obligation(stack) { |
