mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Update rustc.
This commit is contained in:
parent
4401622eb1
commit
18dbcda8f5
2 changed files with 5 additions and 5 deletions
|
@ -99,7 +99,7 @@ fn is_unrooted_ty<'tcx>(
|
||||||
in_new_function: bool,
|
in_new_function: bool,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
let mut ret = false;
|
let mut ret = false;
|
||||||
let mut walker = ty.walk(cx.tcx);
|
let mut walker = ty.walk();
|
||||||
while let Some(generic_arg) = walker.next() {
|
while let Some(generic_arg) = walker.next() {
|
||||||
let t = match generic_arg.unpack() {
|
let t = match generic_arg.unpack() {
|
||||||
rustc_middle::ty::subst::GenericArgKind::Type(t) => t,
|
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
|
/// must be #[unrooted_must_root_lint::must_root] themselves
|
||||||
fn check_variant(&mut self, cx: &LateContext, var: &hir::Variant) {
|
fn check_variant(&mut self, cx: &LateContext, var: &hir::Variant) {
|
||||||
let ref map = cx.tcx.hir();
|
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());
|
let attrs = cx.tcx.hir().attrs(parent_item.hir_id());
|
||||||
if !has_lint_attr(&self.symbols, &attrs, self.symbols.must_root) {
|
if !has_lint_attr(&self.symbols, &attrs, self.symbols.must_root) {
|
||||||
match var.data {
|
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 visit_ty(&mut self, _: &'tcx hir::Ty) {}
|
||||||
|
|
||||||
fn nested_visit_map(&mut self) -> hir::intravisit::NestedVisitorMap<Self::Map> {
|
fn nested_visit_map(&mut self) -> Self::Map {
|
||||||
hir::intravisit::NestedVisitorMap::OnlyBodies(self.cx.tcx.hir())
|
self.cx.tcx.hir()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
nightly-2021-12-02
|
nightly-2022-01-20
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue