about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBoxy <supbscripter@gmail.com>2023-03-17 13:34:20 +0000
committerBoxy <supbscripter@gmail.com>2023-03-17 13:38:12 +0000
commitce14a1eba0a9dd4c4bc5394ee53a8d1756796a9e (patch)
treea4046fdd67ff068f09ea8f281027b23c16757525
parentea08d3a47cee34f9943a2ca850ac7b3435fb499e (diff)
downloadrust-ce14a1eba0a9dd4c4bc5394ee53a8d1756796a9e.tar.gz
rust-ce14a1eba0a9dd4c4bc5394ee53a8d1756796a9e.zip
add comments
Co-authored-by: lcnr <rust@lcnr.de>
-rw-r--r--compiler/rustc_trait_selection/src/solve/eval_ctxt.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs b/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs
index 20ed572df80..be138e0ab54 100644
--- a/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs
+++ b/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs
@@ -189,6 +189,11 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
             })
     }
 
+    /// Equates two values returning the nested goals without adding them
+    /// to the nested goals of the `EvalCtxt`.
+    ///
+    /// If possible, try using `eq` instead which automatically handles nested
+    /// goals correctly.
     #[instrument(level = "debug", skip(self, param_env), ret)]
     pub(super) fn eq_and_get_goals<T: ToTrace<'tcx>>(
         &self,