about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAzhng <archer.xn@gmail.com>2020-06-24 16:33:31 -0400
committerAzhng <archer.xn@gmail.com>2020-06-29 16:46:52 -0400
commitdfecaef91478e1b529962bad3c8dffe0a95f9450 (patch)
treeb47dd27f9e4b3f85f4c43720653c41954cfcee0a
parent922ff8e485fc6d95286fcf860e05742dc8797223 (diff)
downloadrust-dfecaef91478e1b529962bad3c8dffe0a95f9450.tar.gz
rust-dfecaef91478e1b529962bad3c8dffe0a95f9450.zip
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 59af475af17..fcb574e4374 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;