about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2021-08-25 11:39:35 -0400
committerGitHub <noreply@github.com>2021-08-25 11:39:35 -0400
commitd7d122faecfcde3c34ffaa1cfa3f81debb60be59 (patch)
treeb87706335c7c673a58182f1e0dfe5069c6b338e0
parenta216d666ca535d3cfcc8839fd3cb3d5e483e2d7e (diff)
downloadrust-d7d122faecfcde3c34ffaa1cfa3f81debb60be59.tar.gz
rust-d7d122faecfcde3c34ffaa1cfa3f81debb60be59.zip
update docs for `type_implements_trait`
-rw-r--r--compiler/rustc_trait_selection/src/infer.rs4
1 files changed, 4 insertions, 0 deletions
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 @@ pub trait InferCtxtExt<'tcx> {
     /// - 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,