diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2019-03-03 12:02:42 +0100 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2019-03-03 19:32:42 +0100 |
commit | 99b898753f35c6e39afc7fdbf95cd47ca3917890 (patch) | |
tree | 01bc46f751607e9a6ff59d4e464a4a8e38580dae /components/script_plugins/unrooted_must_root.rs | |
parent | 4d8d54fc00644204768886569959429dd67998a0 (diff) | |
download | servo-99b898753f35c6e39afc7fdbf95cd47ca3917890.tar.gz servo-99b898753f35c6e39afc7fdbf95cd47ca3917890.zip |
Upgrade to rustc 1.34.0-nightly (0ea22717a 2019-03-02)
Diffstat (limited to 'components/script_plugins/unrooted_must_root.rs')
-rw-r--r-- | components/script_plugins/unrooted_must_root.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script_plugins/unrooted_must_root.rs b/components/script_plugins/unrooted_must_root.rs index c4694b5e56a..c55fcebe405 100644 --- a/components/script_plugins/unrooted_must_root.rs +++ b/components/script_plugins/unrooted_must_root.rs @@ -128,7 +128,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass { }; if item.attrs.iter().all(|a| !a.check_name("must_root")) { for ref field in def.fields() { - let def_id = cx.tcx.hir().local_def_id(field.id); + let def_id = cx.tcx.hir().local_def_id_from_hir_id(field.hir_id); if is_unrooted_ty(cx, cx.tcx.type_of(def_id), false) { cx.span_lint(UNROOTED_MUST_ROOT, field.span, "Type must be rooted, use #[must_root] on the struct definition to propagate") @@ -141,7 +141,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass { fn check_variant(&mut self, cx: &LateContext, var: &hir::Variant, _gen: &hir::Generics) { let ref map = cx.tcx.hir(); if map - .expect_item(map.get_parent(var.node.data.id())) + .expect_item_by_hir_id(map.get_parent_item(var.node.data.hir_id())) .attrs .iter() .all(|a| !a.check_name("must_root")) @@ -149,7 +149,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass { match var.node.data { hir::VariantData::Tuple(ref fields, ..) => { for ref field in fields { - let def_id = cx.tcx.hir().local_def_id(field.id); + let def_id = cx.tcx.hir().local_def_id_from_hir_id(field.hir_id); if is_unrooted_ty(cx, cx.tcx.type_of(def_id), false) { cx.span_lint( UNROOTED_MUST_ROOT, |