From d7d122faecfcde3c34ffaa1cfa3f81debb60be59 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 25 Aug 2021 11:39:35 -0400 Subject: [PATCH] update docs for `type_implements_trait` --- compiler/rustc_trait_selection/src/infer.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/rustc_trait_selection/src/infer.rs b/compiler/rustc_trait_selection/src/infer.rs index c55b379741e..3e79545d725 100644 --- a/compiler/rustc_trait_selection/src/infer.rs +++ b/compiler/rustc_trait_selection/src/infer.rs @@ -44,6 +44,10 @@ fn partially_normalize_associated_types_in( /// - the self type /// - the *other* type parameters of the trait, excluding the self-type /// - the parameter environment + /// + /// Invokes `evaluate_obligation`, so in the event that evaluating + /// `Ty: Trait` causes overflow, EvaluatedToRecur (or EvaluatedToUnknown) + /// will be returned. fn type_implements_trait( &self, trait_def_id: DefId,