aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_plugins/unrooted_must_root.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2019-07-06 13:45:21 +0200
committerSimon Sapin <simon.sapin@exyr.org>2019-07-17 10:48:54 +0200
commitd3718823ba920db1707ba1d137fcf00ce2f467b1 (patch)
tree5ca2a6e62260179d73f54aeb39a464f2d57dfa47 /components/script_plugins/unrooted_must_root.rs
parentb6bd2d730207870e2ace19c018d0148315fbca7b (diff)
downloadservo-d3718823ba920db1707ba1d137fcf00ce2f467b1.tar.gz
servo-d3718823ba920db1707ba1d137fcf00ce2f467b1.zip
Upgrade to rustc 1.38.0-nightly (4b65a86eb 2019-07-15)
Diffstat (limited to 'components/script_plugins/unrooted_must_root.rs')
-rw-r--r--components/script_plugins/unrooted_must_root.rs6
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 ae278cb820d..f813f3ecad0 100644
--- a/components/script_plugins/unrooted_must_root.rs
+++ b/components/script_plugins/unrooted_must_root.rs
@@ -161,7 +161,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
.all(|a| !a.check_name(self.symbols.must_root))
{
for ref field in def.fields() {
- let def_id = cx.tcx.hir().local_def_id_from_hir_id(field.hir_id);
+ let def_id = cx.tcx.hir().local_def_id(field.hir_id);
if is_unrooted_ty(&self.symbols, 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")
@@ -182,7 +182,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_from_hir_id(field.hir_id);
+ let def_id = cx.tcx.hir().local_def_id(field.hir_id);
if is_unrooted_ty(&self.symbols, cx, cx.tcx.type_of(def_id), false) {
cx.span_lint(
UNROOTED_MUST_ROOT,
@@ -215,7 +215,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
};
if !in_derive_expn(span) {
- let def_id = cx.tcx.hir().local_def_id_from_hir_id(id);
+ let def_id = cx.tcx.hir().local_def_id(id);
let sig = cx.tcx.type_of(def_id).fn_sig(cx.tcx);
for (arg, ty) in decl.inputs.iter().zip(sig.inputs().skip_binder().iter()) {