aboutsummaryrefslogtreecommitdiffstats
path: root/support/crown/src/unrooted_must_root.rs
diff options
context:
space:
mode:
Diffstat (limited to 'support/crown/src/unrooted_must_root.rs')
-rw-r--r--support/crown/src/unrooted_must_root.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/support/crown/src/unrooted_must_root.rs b/support/crown/src/unrooted_must_root.rs
index 36c22c3170b..d01ede4c0bb 100644
--- a/support/crown/src/unrooted_must_root.rs
+++ b/support/crown/src/unrooted_must_root.rs
@@ -77,7 +77,7 @@ fn is_unrooted_ty<'tcx>(
let mut walker = ty.walk();
while let Some(generic_arg) = walker.next() {
let t = match generic_arg.unpack() {
- rustc_middle::ty::subst::GenericArgKind::Type(t) => t,
+ rustc_middle::ty::GenericArgKind::Type(t) => t,
_ => {
walker.skip_current_subtree();
continue;
@@ -191,7 +191,7 @@ impl<'tcx> LateLintPass<'tcx> for UnrootedPass {
if let hir::ItemKind::Struct(def, ..) = &item.kind {
for ref field in def.fields() {
let field_type = cx.tcx.type_of(field.def_id);
- if is_unrooted_ty(&self.symbols, cx, field_type.0, false) {
+ if is_unrooted_ty(&self.symbols, cx, field_type.skip_binder(), false) {
cx.lint(
UNROOTED_MUST_ROOT,
"Type must be rooted, use #[crown::unrooted_must_root_lint::must_root] \
@@ -214,7 +214,7 @@ impl<'tcx> LateLintPass<'tcx> for UnrootedPass {
hir::VariantData::Tuple(fields, ..) => {
for field in fields {
let field_type = cx.tcx.type_of(field.def_id);
- if is_unrooted_ty(&self.symbols, cx, field_type.0, false) {
+ if is_unrooted_ty(&self.symbols, cx, field_type.skip_binder(), false) {
cx.lint(
UNROOTED_MUST_ROOT,
"Type must be rooted, \
@@ -247,7 +247,7 @@ impl<'tcx> LateLintPass<'tcx> for UnrootedPass {
};
if !in_derive_expn(span) {
- let sig = cx.tcx.type_of(def_id).0.fn_sig(cx.tcx);
+ let sig = cx.tcx.type_of(def_id).skip_binder().fn_sig(cx.tcx);
for (arg, ty) in decl.inputs.iter().zip(sig.inputs().skip_binder().iter()) {
if is_unrooted_ty(&self.symbols, cx, *ty, false) {