aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_plugins
diff options
context:
space:
mode:
Diffstat (limited to 'components/script_plugins')
-rw-r--r--components/script_plugins/lib.rs1
-rw-r--r--components/script_plugins/unrooted_must_root.rs4
-rw-r--r--components/script_plugins/utils.rs2
3 files changed, 4 insertions, 3 deletions
diff --git a/components/script_plugins/lib.rs b/components/script_plugins/lib.rs
index 3f256fdf11c..eb21b57be16 100644
--- a/components/script_plugins/lib.rs
+++ b/components/script_plugins/lib.rs
@@ -16,6 +16,7 @@
#![deny(unsafe_code)]
+#![feature(macro_at_most_once_rep)]
#![feature(macro_vis_matcher)]
#![feature(plugin)]
#![feature(plugin_registrar)]
diff --git a/components/script_plugins/unrooted_must_root.rs b/components/script_plugins/unrooted_must_root.rs
index 502ae03de12..6277b309c0c 100644
--- a/components/script_plugins/unrooted_must_root.rs
+++ b/components/script_plugins/unrooted_must_root.rs
@@ -143,14 +143,14 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
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().0.iter()) {
+ for (arg, ty) in decl.inputs.iter().zip(sig.inputs().skip_binder().iter()) {
if is_unrooted_ty(cx, ty, false) {
cx.span_lint(UNROOTED_MUST_ROOT, arg.span, "Type must be rooted")
}
}
if !in_new_function {
- if is_unrooted_ty(cx, sig.output().0, false) {
+ if is_unrooted_ty(cx, sig.output().skip_binder(), false) {
cx.span_lint(UNROOTED_MUST_ROOT, decl.output.span(), "Type must be rooted")
}
}
diff --git a/components/script_plugins/utils.rs b/components/script_plugins/utils.rs
index 45a348ea14f..9199e5b083b 100644
--- a/components/script_plugins/utils.rs
+++ b/components/script_plugins/utils.rs
@@ -25,7 +25,7 @@ pub fn match_def_path(cx: &LateContext, def_id: DefId, path: &[&str]) -> bool {
other.into_iter()
.map(|e| e.data)
.zip(path)
- .all(|(nm, p)| &*nm.as_interned_str() == *p)
+ .all(|(nm, p)| &*nm.as_interned_str().as_str() == *p)
}
pub fn in_derive_expn(span: Span) -> bool {