Address nits
Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
This commit is contained in:
parent
7196973c3e
commit
fbe66a6ef3
3 changed files with 5 additions and 15 deletions
|
@ -1377,12 +1377,7 @@ fn assemble_candidates_from_trait_def<'cx, 'tcx>(
|
|||
// Check whether the self-type is itself a projection.
|
||||
// If so, extract what we know from the trait and try to come up with a good answer.
|
||||
let bounds = match *obligation.predicate.self_ty().kind() {
|
||||
ty::Alias(ty::Projection, ref data) => {
|
||||
tcx.bound_item_bounds(data.def_id).subst(tcx, data.substs)
|
||||
}
|
||||
ty::Alias(ty::Opaque, ty::AliasTy { def_id, substs }) => {
|
||||
tcx.bound_item_bounds(def_id).subst(tcx, substs)
|
||||
}
|
||||
ty::Alias(_, ref data) => tcx.bound_item_bounds(data.def_id).subst(tcx, data.substs),
|
||||
ty::Infer(ty::TyVar(_)) => {
|
||||
// If the self-type is an inference variable, then it MAY wind up
|
||||
// being a projected type, so induce an ambiguity.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue