Ensure no one constructs AliasTy
s themselves
This commit is contained in:
parent
4ffe3bdf99
commit
a5cd3bde95
50 changed files with 104 additions and 106 deletions
|
@ -1595,7 +1595,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
|
||||
let tcx = self.infcx.tcx;
|
||||
let (def_id, substs) = match *placeholder_trait_predicate.trait_ref.self_ty().kind() {
|
||||
ty::Alias(_, ty::AliasTy { def_id, substs }) => (def_id, substs),
|
||||
ty::Alias(_, ty::AliasTy { def_id, substs, .. }) => (def_id, substs),
|
||||
_ => {
|
||||
span_bug!(
|
||||
obligation.cause.span,
|
||||
|
@ -2259,7 +2259,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
t.rebind(def.all_fields().map(|f| f.ty(self.tcx(), substs)).collect())
|
||||
}
|
||||
|
||||
ty::Alias(ty::Opaque, ty::AliasTy { def_id, substs }) => {
|
||||
ty::Alias(ty::Opaque, ty::AliasTy { def_id, substs, .. }) => {
|
||||
// We can resolve the `impl Trait` to its concrete type,
|
||||
// which enforces a DAG between the functions requiring
|
||||
// the auto trait bounds in question.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue