about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2020-07-06 17:45:20 -0700
committerGitHub <noreply@github.com>2020-07-06 17:45:20 -0700
commit245b006a2e9453307443356d511e9e89967cfef9 (patch)
treed7ddf7e8218ed42ea5a56814342cbba040d46991
parent30c046ede47ea45a772d2656b0365a4807263bca (diff)
parentdfecaef91478e1b529962bad3c8dffe0a95f9450 (diff)
downloadrust-245b006a2e9453307443356d511e9e89967cfef9.tar.gz
rust-245b006a2e9453307443356d511e9e89967cfef9.zip
Rollup merge of #73870 - sexxi-goose:projection-ty, r=nikomatsakis
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 https://github.com/rust-lang/project-rfc-2229/issues/5
-rw-r--r--clippy_lints/src/escape.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/escape.rs b/clippy_lints/src/escape.rs
index d40cdfcca9f..b10181062ff 100644
--- a/clippy_lints/src/escape.rs
+++ b/clippy_lints/src/escape.rs
@@ -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;