Skip to content

Commit 7c97a76

Browse files
committed
re-add comment
1 parent aa28b77 commit 7c97a76

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
@@ -324,6 +324,12 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
324324
candidates
325325
}
326326

327+
/// HACK: `_: Trait` is ambiguous, because it may be satisfied via a builtin rule,
328+
/// object bound, alias bound, etc. We are unable to determine this until we can at
329+
/// least structurally resolve the type one layer.
330+
///
331+
/// It would also require us to consider all impls of the trait, which is both pretty
332+
/// bad for perf and would also constrain the self type if there is just a single impl.
327333
fn self_ty_infer_ambiguity_hack<G: GoalKind<'tcx>>(
328334
&mut self,
329335
goal: Goal<'tcx, G>,

0 commit comments

Comments
 (0)