We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa28b77 commit 7c97a76Copy full SHA for 7c97a76
compiler/rustc_trait_selection/src/solve/assembly/mod.rs
@@ -324,6 +324,12 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
324
candidates
325
}
326
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.
333
fn self_ty_infer_ambiguity_hack<G: GoalKind<'tcx>>(
334
&mut self,
335
goal: Goal<'tcx, G>,
0 commit comments