Skip to content

Commit a913c24

Browse files
committed
add comment
1 parent 98aa362 commit a913c24

File tree

1 file changed

+6
-0
lines changed
  • compiler/rustc_trait_selection/src/solve/assembly

1 file changed

+6
-0
lines changed

compiler/rustc_trait_selection/src/solve/assembly/mod.rs

+6
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,12 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
779779
}
780780
}
781781

782+
/// In coherence we have to not only care about all impls we know about, but
783+
/// also consider impls which may get added in a downstream or sibling crate
784+
/// or which an upstream impl may add in a minor release.
785+
///
786+
/// To do so we add an ambiguous candidate in case such an unknown impl could
787+
/// apply to the current goal.
782788
#[instrument(level = "debug", skip_all)]
783789
fn assemble_coherence_unknowable_candidates<G: GoalKind<'tcx>>(
784790
&mut self,

0 commit comments

Comments
 (0)