Update rustc.

This commit is contained in:
Josh Matthews 2022-01-20 23:05:47 -05:00
parent 4401622eb1
commit 18dbcda8f5
2 changed files with 5 additions and 5 deletions

View file

@ -99,7 +99,7 @@ fn is_unrooted_ty<'tcx>(
in_new_function: bool,
) -> bool {
let mut ret = false;
let mut walker = ty.walk(cx.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,
@ -233,7 +233,7 @@ impl<'tcx> LateLintPass<'tcx> for UnrootedPass {
/// must be #[unrooted_must_root_lint::must_root] themselves
fn check_variant(&mut self, cx: &LateContext, var: &hir::Variant) {
let ref map = cx.tcx.hir();
let parent_item = map.expect_item(map.get_parent_item(var.id).expect_owner());
let parent_item = map.expect_item(map.get_parent_item(var.id));
let attrs = cx.tcx.hir().attrs(parent_item.hir_id());
if !has_lint_attr(&self.symbols, &attrs, self.symbols.must_root) {
match var.data {
@ -378,8 +378,8 @@ impl<'a, 'tcx> visit::Visitor<'tcx> for FnDefVisitor<'a, 'tcx> {
fn visit_ty(&mut self, _: &'tcx hir::Ty) {}
fn nested_visit_map(&mut self) -> hir::intravisit::NestedVisitorMap<Self::Map> {
hir::intravisit::NestedVisitorMap::OnlyBodies(self.cx.tcx.hir())
fn nested_visit_map(&mut self) -> Self::Map {
self.cx.tcx.hir()
}
}