diff options
| author | lcnr <rust@lcnr.de> | 2024-02-09 10:06:16 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2024-02-09 10:44:19 +0100 |
| commit | a913c243daf3e716f8e060adde046d7f98813a83 (patch) | |
| tree | 7b1e726673525099ecb43f18c301f184d37d4830 | |
| parent | 98aa3624be70462d6a25ed5544333e3df62f4c66 (diff) | |
| download | rust-a913c243daf3e716f8e060adde046d7f98813a83.tar.gz rust-a913c243daf3e716f8e060adde046d7f98813a83.zip | |
add comment
| -rw-r--r-- | compiler/rustc_trait_selection/src/solve/assembly/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/assembly/mod.rs b/compiler/rustc_trait_selection/src/solve/assembly/mod.rs index 239072dfc8e..21a2ba02cd7 100644 --- a/compiler/rustc_trait_selection/src/solve/assembly/mod.rs +++ b/compiler/rustc_trait_selection/src/solve/assembly/mod.rs @@ -779,6 +779,12 @@ impl<'tcx> EvalCtxt<'_, 'tcx> { } } + /// In coherence we have to not only care about all impls we know about, but + /// also consider impls which may get added in a downstream or sibling crate + /// or which an upstream impl may add in a minor release. + /// + /// To do so we add an ambiguous candidate in case such an unknown impl could + /// apply to the current goal. #[instrument(level = "debug", skip_all)] fn assemble_coherence_unknowable_candidates<G: GoalKind<'tcx>>( &mut self, |
