Skip to content

Commit dfecaef

Browse files
committed
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
1 parent 922ff8e commit dfecaef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/escape.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ impl<'a, 'tcx> Delegate<'tcx> for EscapeDelegate<'a, 'tcx> {
150150
return;
151151
}
152152

153-
if is_non_trait_box(cmt.place.ty) && !self.is_large_box(cmt.place.ty) {
153+
if is_non_trait_box(cmt.place.ty()) && !self.is_large_box(cmt.place.ty()) {
154154
self.set.insert(cmt.hir_id);
155155
}
156156
return;

0 commit comments

Comments
 (0)