add tcx
to fn walk
This commit is contained in:
parent
bfaf13af4e
commit
cc47998e28
29 changed files with 73 additions and 67 deletions
|
@ -152,8 +152,8 @@ declare_lint! {
|
|||
declare_lint_pass!(BoxPointers => [BOX_POINTERS]);
|
||||
|
||||
impl BoxPointers {
|
||||
fn check_heap_type(&self, cx: &LateContext<'_>, span: Span, ty: Ty<'_>) {
|
||||
for leaf in ty.walk() {
|
||||
fn check_heap_type<'tcx>(&self, cx: &LateContext<'tcx>, span: Span, ty: Ty<'tcx>) {
|
||||
for leaf in ty.walk(cx.tcx) {
|
||||
if let GenericArgKind::Type(leaf_ty) = leaf.unpack() {
|
||||
if leaf_ty.is_box() {
|
||||
cx.struct_span_lint(BOX_POINTERS, span, |lint| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue