From 9c076f3f90444183d4d51754f19ea55a801e0e05 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Thu, 17 Mar 2022 12:37:18 -0300 Subject: [PATCH] Add more commments --- compiler/rustc_trait_selection/src/traits/coherence.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/rustc_trait_selection/src/traits/coherence.rs b/compiler/rustc_trait_selection/src/traits/coherence.rs index 63aacbe2e85..60111446b94 100644 --- a/compiler/rustc_trait_selection/src/traits/coherence.rs +++ b/compiler/rustc_trait_selection/src/traits/coherence.rs @@ -353,6 +353,7 @@ fn negative_impl<'cx, 'tcx>( }) } +/// Try to prove that a negative impl exist for the given obligation and their super predicates. #[instrument(level = "debug", skip(selcx))] fn negative_impl_exists<'cx, 'tcx>( selcx: &SelectionContext<'cx, 'tcx>, @@ -366,6 +367,7 @@ fn negative_impl_exists<'cx, 'tcx>( return true; } + // Try to prove a negative obligation exist for super predicates // FIXME we should implement an `assemble_neg_candidates` fn for o in util::elaborate_predicates(infcx.tcx, iter::once(o.predicate)) { if resolve_negative_obligation(infcx, param_env, region_context, &o) {