Skip to content

Commit

Permalink
Rollup merge of #73870 - sexxi-goose:projection-ty, r=nikomatsakis
Browse files Browse the repository at this point in the history
typeck: adding type information to projection

This commit modifies the Place as follow:
* remove 'ty' from ProjectionKind
* add type information into to Projection
* replace 'ty' in Place with 'base_ty'
* introduce 'ty()' in `Place` to return the final type of the `Place`
* introduce `ty_before_projection()` in `Place` to return the type of
  a `Place` before i'th projection is applied

Closes rust-lang/project-rfc-2229#5
  • Loading branch information
Manishearth committed Jul 7, 2020
2 parents 30c046e + dfecaef commit 245b006
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/escape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ impl<'a, 'tcx> Delegate<'tcx> for EscapeDelegate<'a, 'tcx> {
return;
}

if is_non_trait_box(cmt.place.ty) && !self.is_large_box(cmt.place.ty) {
if is_non_trait_box(cmt.place.ty()) && !self.is_large_box(cmt.place.ty()) {
self.set.insert(cmt.hir_id);
}
return;
Expand Down

0 comments on commit 245b006

Please sign in to comment.