Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downgrade ProjectionTy's TraitRef to its substs #42388

Merged
merged 1 commit into from
Jul 11, 2017

Conversation

tbg
Copy link
Contributor

@tbg tbg commented Jun 2, 2017

Addresses the second part of #42171 by removing the TraitRef from
ProjectionTy, and directly storing its Substs.

Closes #42171.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @eddyb (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@tbg
Copy link
Contributor Author

tbg commented Jun 2, 2017

r? @nikomatsakis

@rust-highfive rust-highfive assigned nikomatsakis and unassigned eddyb Jun 2, 2017
// at least for now.
//
// let trait_inputs =
// ty::tls::with(|tcx| data.0.projection_ty.trait_ref(tcx)).input_types();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ty::tls::with is not for regular consumption, only for pretty-printing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gone now thanks to your other comment.

@@ -839,14 +839,17 @@ impl<'tcx> TypeFoldable<'tcx> for ty::ExistentialProjection<'tcx> {

impl<'tcx> TypeFoldable<'tcx> for ty::ProjectionTy<'tcx> {
fn super_fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(&self, folder: &mut F) -> Self {
let folded_trait_ref = ty::tls::with(|tcx| self.trait_ref(tcx).fold_with(folder));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, use folder.tcx().

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

item_def_id: self.item_def_id,
}
}

fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool {
self.trait_ref.visit_with(visitor)
ty::tls::with(|tcx| self.trait_ref(tcx).visit_with(visitor))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, use visitor.tcx().

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No such thing, unfortunately.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right, visitor. You'll have to update all the implementers that overload visit_trait_ref to handle TyProjection themselves. At this rate I doubt visit_trait_ref is useful anymore since it shouldn't appear in a Ty. What you have to do here fwiw is to visit only substitutions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think we should just replace this code with:

let ty::ProjectionTy { ref substs, item_def_id: _ } = *self;
substs.visit_with(visitor)

and be done with it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

let item_name = ty::tls::with(|tcx| self.item_name(tcx));
let (trait_ref, item_name) = ty::tls::with(
|tcx| (self.trait_ref(tcx), self.item_name(tcx))
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is okay, I suppose.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although I don't think I agree with the indentation, the closure arguments should be on the previous line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to change the indentation to what you prefer. In the meantime, moved |tcx| up where it belongs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like I said, I think this can use parametrized.

@@ -175,7 +175,11 @@ pub fn setup_constraining_predicates<'tcx>(predicates: &mut [ty::Predicate<'tcx>
// Special case: watch out for some kind of sneaky attempt
// to project out an associated type defined by this very
// trait.
let unbound_trait_ref = &projection.projection_ty.trait_ref;
//
// FIXME(tschottdorf): no `tcx` available. Use of tls::with ok?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass tcx in from the caller.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You still have two more cases here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

_ => None,
ty::TyAdt(adt_def, _) => Some(adt_def.did),
ty::TyProjection(ref proj) =>
Some(ty::tls::with(|tcx| proj.trait_ref(tcx).def_id)),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prof.item_def_id might be good enough? cc @nikomatsakis @michaelwoerister

_ => None,
ty::TyAdt(adt_def, _) => Some(adt_def.did),
ty::TyProjection(ref proj) =>
Some(ty::tls::with(|tcx| proj.trait_ref(tcx).def_id)),
Copy link
Member

@eddyb eddyb Jun 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -1034,7 +1034,7 @@ impl<'tcx> ToPolyTraitRef<'tcx> for PolyProjectionPredicate<'tcx> {
// This is because here `self` has a `Binder` and so does our
// return value, so we are preserving the number of binding
// levels.
ty::Binder(self.0.projection_ty.trait_ref)
ty::Binder(ty::tls::with(|tcx| self.0.projection_ty.trait_ref(tcx)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't implement ToPolyTraitRef - nor does that make sense IMO.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean/what would you like me to do?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the ToPolyTraitRef impl and see what breaks.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still applicable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries, I track all comments that I haven't answered in the affirmative.

Removing the impl breaks, among other places, process_predicate:

        ty::Predicate::Projection(ref data) => {
            let project_obligation = obligation.with(data.clone());
            match project::poly_project_and_unify_type(selcx, &project_obligation) {
                Ok(None) => {
                    pending_obligation.stalled_on =
                        trait_ref_type_vars(selcx, data.to_poly_trait_ref());
                    Ok(None)
                }
                Ok(v) => Ok(v),
                Err(e) => Err(CodeProjectionError(e))
            }
        }

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that could do the work itself. Not sure if data.trait_ref(tcx).to_poly_trait_ref() works though (it might assert).

Copy link
Member

@eddyb eddyb Jun 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, going through .trait_ref wouldn't work, TraitRef::to_poly_trait_ref will assert, you need to move this to an inherent method that takes TyCtxt.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @eddyb that it is what dubious for this type to implement to_poly_trait_ref. An inherent function seems better. Basically is converting a predicate like T: Iterator<Item=Foo> into the underlying T: Iterator trait-reference -- that's not wrong, but it feels like it merits an explicit "cast". This was (however) equally true before, I guess -- but still better to fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'm looking at this now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Moved the method off the trait, supplied the tcx in the ~4 call sites.

// -------------------------------------------------------- ^
// | temporary value dropped here while still borrowed
// temporary value created here
let trait_inputs = data.0.projection_ty.deprecated_trait_ref.input_types();
trait_inputs.chain(Some(data.0.ty)).collect()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace trait_inputs with data.substs.types().

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done (assume you mean changing to data.0.projection_ty.substs.types().chain(Some(data.0.ty)).collect()

@shepmaster shepmaster added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 2, 2017
@bors
Copy link
Contributor

bors commented Jun 2, 2017

☔ The latest upstream changes (presumably #42189) made this pull request unmergeable. Please resolve the merge conflicts.

@@ -1543,7 +1543,7 @@ impl<'a, 'gcx, 'tcx> GenericKind<'tcx> {
match *self {
GenericKind::Param(ref p) => p.to_ty(tcx),
GenericKind::Projection(ref p) => tcx.mk_projection(
p.trait_ref.clone(), p.item_name(tcx)),
p.trait_ref(tcx).clone(), p.item_name(tcx)),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mk_projection should not do the lookup itself.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume you are suggesting that mk_projection should change its signature, and in particular likely take item_def_id directly? Before I go wild on this, what would the final signature be? There would be some fallout, some call sites have exactly trait_ref and item_name available.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DefId and Substs. No callsites should really need to search for the associated item if they don't already, e.g. anything to do with lang item traits with an associated type should just get the associated type ignoring its name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Did the easy part of this - some call sites remain. I'll take another look at those. For example, what am I doing below? Refactor ast_path_to_mono_trait_ref?

        let trait_ref = self.ast_path_to_mono_trait_ref(span,
                                                        trait_def_id,
                                                        self_ty,
                                                        trait_segment);

        debug!("qpath_to_ty: trait_ref={:?}", trait_ref);

        self.normalize_ty(span, tcx.mk_deprecated_projection(trait_ref, item_segment.name))

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The question is where trait_def_id comes from there - there should be an associated type DefId somewhere, and you can combine that with trait_ref.substs.

@@ -354,7 +354,8 @@ pub fn normalize_projection_type<'a, 'b, 'gcx, 'tcx>(
// information is available.

let tcx = selcx.infcx().tcx;
let def_id = tcx.associated_items(projection_ty.trait_ref.def_id).find(|i|
// FIXME(tschottdorf): simplify?
let def_id = tcx.associated_items(projection_ty.trait_ref(selcx.tcx()).def_id).find(|i|
i.name == projection_ty.item_name(tcx) && i.kind == ty::AssociatedKind::Type
).map(|i| i.def_id).unwrap();
let ty_var = selcx.infcx().next_ty_var(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed this is projection_ty.item_def_id. In general avoid using the new trait_ref method where possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

let trait_obligation = Obligation { cause: cause,
recursion_depth: depth,
predicate: trait_ref.to_predicate() };
let tcx = selcx.infcx().tcx;
let def_id = tcx.associated_items(projection_ty.trait_ref.def_id).find(|i|
let def_id = tcx.associated_items(projection_ty.trait_ref(selcx.tcx()).def_id).find(|i|
i.name == projection_ty.item_name(tcx) && i.kind == ty::AssociatedKind::Type
).map(|i| i.def_id).unwrap();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, looks like an earlier PR didn't clean all of these up. Calls of item_name should also be rare.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -1177,7 +1179,7 @@ fn confirm_callable_candidate<'cx, 'gcx, 'tcx>(
// Note: we unwrap the binder here but re-create it below (1)
let ty::Binder((trait_ref, ret_type)) =
tcx.closure_trait_ref_and_return_type(fn_once_def_id,
obligation.predicate.trait_ref.self_ty(),
obligation.predicate.trait_ref(selcx.tcx()).self_ty(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need to call trait_ref to get something from the substs. Maybe add self_ty to ProjectionTy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -230,7 +230,7 @@ impl<'tcx> Relate<'tcx> for ty::ProjectionTy<'tcx> {
Err(TypeError::ProjectionNameMismatched(
expected_found(relation, &a.item_name(tcx), &b.item_name(tcx))))
} else {
let trait_ref = relation.relate(&a.trait_ref, &b.trait_ref)?;
let trait_ref = relation.relate(&a.trait_ref(tcx), &b.trait_ref(tcx))?;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relate substitutions directly. Also the name check above is silly now, should check DefId.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -134,7 +134,7 @@ impl<'a, 'tcx> Lift<'tcx> for ty::ProjectionTy<'a> {
type Lifted = ty::ProjectionTy<'tcx>;
fn lift_to_tcx<'b, 'gcx>(&self, tcx: TyCtxt<'b, 'gcx, 'tcx>)
-> Option<ty::ProjectionTy<'tcx>> {
tcx.lift(&self.trait_ref).map(|trait_ref| {
tcx.lift(&self.trait_ref(tcx)).map(|trait_ref| {
ty::ProjectionTy::from_ref_and_name(tcx, trait_ref, self.item_name(tcx))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should lift substitutions instead. from_ref_and_name should likely not exist.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. (from_ref_and_name still exists, but I'll keep knocking 'em down and when you're satisfied look at the whole diff again to see what else can go).

@@ -839,14 +839,17 @@ impl<'tcx> TypeFoldable<'tcx> for ty::ExistentialProjection<'tcx> {

impl<'tcx> TypeFoldable<'tcx> for ty::ProjectionTy<'tcx> {
fn super_fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(&self, folder: &mut F) -> Self {
let folded_trait_ref = self.trait_ref(folder.tcx()).fold_with(folder);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can folding a trait ref be overloaded? i.e. is there any fold_trait_ref? If not you can just fold substitutions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's this:

    fn fold_trait_ref(&mut self, p: TraitRef) -> TraitRef {
        noop_fold_trait_ref(p, self)
    }

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it overloaded by anything?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uhm I think I removed on master recently. So no, it wasn't needed, you can just fold substs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fold_trait_ref should be gone now. Oh wait. What you found is an AST folder facepalms.
Apologies, you could've done this before the rebase too. Just fold the substs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

// FIXME(tschottdorf): this case is impossible.
ty::ImplContainer(def_id) => {
bug!("asked for a TraitContainer, got an ImplContainer with DefId {:?}", def_id)
}
Copy link
Member

@eddyb eddyb Jun 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This indentation is off to the right.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. WDYT about the message?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Irrelevant and there is a method to get the DefId anyway, that'd make this cleaner.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, here and in the other place.

@@ -90,7 +90,8 @@ fn push_subtypes<'tcx>(stack: &mut TypeWalkerStack<'tcx>, parent_ty: Ty<'tcx>) {
stack.push(mt.ty);
}
ty::TyProjection(ref data) => {
stack.extend(data.trait_ref.substs.types().rev());
// FIXME(tschottdorf): scrutinize use of `ProjectionTy.substs` here.
stack.extend(data.substs.types().rev());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -974,7 +974,7 @@ impl<'a, 'tcx: 'a> TypeVisitor<'tcx> for SearchInterfaceForPrivateItemsVisitor<'
if let ty::TyProjection(ref proj) = ty.sty {
// Avoid calling `visit_trait_ref` below on the trait,
// as we have already checked the trait itself above.
proj.trait_ref.super_visit_with(self)
proj.trait_ref(self.tcx).super_visit_with(self)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can just call proj.substs.visit_with.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -615,7 +615,8 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> {
hir::QPath::TypeRelative(..) => {
let ty = hir_ty_to_ty(self.tcx, ty);
if let ty::TyProjection(proj) = ty.sty {
for item in self.tcx.associated_items(proj.trait_ref.def_id) {
let trait_ref = proj.trait_ref(self.tcx);
for item in self.tcx.associated_items(trait_ref.def_id) {
if item.kind == ty::AssociatedKind::Type {
if item.name == proj.item_name(self.tcx) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another unnecessary search for a DefId that is already known.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -653,7 +653,7 @@ impl<'o, 'gcx: 'tcx, 'tcx> AstConv<'gcx, 'tcx>+'o {
bound.map_bound(|b| {
let p = b.projection_ty;
ty::ExistentialProjection {
trait_ref: self.trait_ref_to_existential(p.trait_ref),
trait_ref: self.trait_ref_to_existential(p.trait_ref(tcx)),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reminds me that ExistentialProjection also needs to be updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack.

@tbg
Copy link
Contributor Author

tbg commented Jun 3, 2017

Thanks @eddyb! Addressed parts of your comments, will come back to the rest later. Avoiding the rebase intentionally for now until the dust has settled.

@@ -680,7 +680,7 @@ impl<'o, 'gcx: 'tcx, 'tcx> AstConv<'gcx, 'tcx>+'o {
}

for projection_bound in &projection_bounds {
let pair = (projection_bound.0.projection_ty.trait_ref.def_id,
let pair = (projection_bound.0.projection_ty.trait_ref(tcx).def_id,
projection_bound.0.projection_ty.item_name(tcx));
associated_types.remove(&pair);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can probably just work on .item_def_id.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@bors
Copy link
Contributor

bors commented Jul 6, 2017

☔ The latest upstream changes (presumably #43008) made this pull request unmergeable. Please resolve the merge conflicts.

@tbg
Copy link
Contributor Author

tbg commented Jul 6, 2017

ping @nikomatsakis - rebased & green.

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jul 7, 2017

📌 Commit 0d436ed has been approved by nikomatsakis

@bors
Copy link
Contributor

bors commented Jul 7, 2017

⌛ Testing commit 0d436edf030c4afea671069456e1f0084040d1dd with merge 63ff04c3ec23fe9760cc9fe876a3c5d7b989f0d4...

@bors
Copy link
Contributor

bors commented Jul 7, 2017

💔 Test failed - status-travis

@tbg tbg force-pushed the projty-substs branch 2 times, most recently from b2cd0bf to 3166a02 Compare July 7, 2017 21:11
@tbg
Copy link
Contributor Author

tbg commented Jul 8, 2017

@eddyb if you have the bandwidth - a PR before me (#42125) in the merge queue used visit_trait_ref, so I had to do another round of refactors. Tests pass now, but I think a pair of eyes is advised (new commits only).

@nikomatsakis
Copy link
Contributor

The new commits look good to me. r=me, did you want to fixup first though? (your comment titles suggest you did :)

@tbg
Copy link
Contributor Author

tbg commented Jul 10, 2017

Yep, done. Ready to hit the queue.

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jul 10, 2017

📌 Commit 0b321bf has been approved by nikomatsakis

@bors
Copy link
Contributor

bors commented Jul 10, 2017

⌛ Testing commit 0b321bfe9b47fb4114968497ed3a4cb50b017b70 with merge 5a89479419a0b2823a93041206ed0dad2dc16feb...

@bors
Copy link
Contributor

bors commented Jul 10, 2017

💔 Test failed - status-travis

@bors
Copy link
Contributor

bors commented Jul 11, 2017

☔ The latest upstream changes (presumably #43028) made this pull request unmergeable. Please resolve the merge conflicts.

Addresses the second part of rust-lang#42171 by removing the `TraitRef` from
`ProjectionTy`, and directly storing its `Substs`.

Closes rust-lang#42171.
@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jul 11, 2017

📌 Commit 687ee7f has been approved by nikomatsakis

@bors
Copy link
Contributor

bors commented Jul 11, 2017

⌛ Testing commit 687ee7f with merge 1475e2c...

bors added a commit that referenced this pull request Jul 11, 2017
Downgrade ProjectionTy's TraitRef to its substs

Addresses the second part of #42171 by removing the `TraitRef` from
`ProjectionTy`, and directly storing its `Substs`.

Closes #42171.
@bors
Copy link
Contributor

bors commented Jul 11, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: nikomatsakis
Pushing 1475e2c to master...

@bors bors merged commit 687ee7f into rust-lang:master Jul 11, 2017
@tbg tbg deleted the projty-substs branch July 11, 2017 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants