diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2017-04-26 17:34:34 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2017-04-26 17:34:34 +0200 |
commit | c234bf92d0f45ebfbfceff92be7101728831379d (patch) | |
tree | de8bf2dca9120459a9dbbf0f44f1c594ab9ea6b2 /components/script_plugins | |
parent | e5762cb6953b5e202e8733e39e8267c4b67a9622 (diff) | |
download | servo-c234bf92d0f45ebfbfceff92be7101728831379d.tar.gz servo-c234bf92d0f45ebfbfceff92be7101728831379d.zip |
Update rustc to 1.18.0-nightly (b0a4074c5 2017-04-26)
Diffstat (limited to 'components/script_plugins')
-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 d869211315e..844eb9b87e6 100644 --- a/components/script_plugins/unrooted_must_root.rs +++ b/components/script_plugins/unrooted_must_root.rs @@ -95,7 +95,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); - if is_unrooted_ty(cx, cx.tcx.item_type(def_id), false) { + 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") } @@ -111,7 +111,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass { hir::VariantData::Tuple(ref fields, _) => { for ref field in fields { let def_id = cx.tcx.hir.local_def_id(field.id); - if is_unrooted_ty(cx, cx.tcx.item_type(def_id), false) { + if is_unrooted_ty(cx, cx.tcx.type_of(def_id), false) { cx.span_lint(UNROOTED_MUST_ROOT, field.ty.span, "Type must be rooted, use #[must_root] on \ the enum definition to propagate") @@ -140,7 +140,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass { if !in_derive_expn(span) { let def_id = cx.tcx.hir.local_def_id(id); - let ty = cx.tcx.item_type(def_id); + let ty = cx.tcx.type_of(def_id); for (arg, ty) in decl.inputs.iter().zip(ty.fn_args().0.iter()) { if is_unrooted_ty(cx, ty, false) { |