From 091feba0ba817709927d1c407f4eb19dc84e57f3 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Tue, 12 Nov 2019 22:08:27 +0100 Subject: [PATCH] =?UTF-8?q?Use=20`#![register=5Fattr(=E2=80=A6)]`=20instea?= =?UTF-8?q?d=20of=20`Registry::register=5Fattribute`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CC https://github.com/rust-lang/rust/pull/66344, https://github.com/rust-lang/rust/issues/66080 --- components/script/lib.rs | 4 ++++ components/script_plugins/lib.rs | 4 ---- rust-toolchain | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/script/lib.rs b/components/script/lib.rs index 87eec7cab02..2dd6094c412 100644 --- a/components/script/lib.rs +++ b/components/script/lib.rs @@ -7,12 +7,16 @@ #![feature(drain_filter)] #![feature(inner_deref)] #![feature(plugin)] +#![feature(register_attr)] #![deny(unsafe_code)] #![allow(non_snake_case)] #![doc = "The script crate contains all matters DOM."] #![cfg_attr(not(feature = "unrooted_must_root_lint"), allow(unknown_lints))] #![allow(deprecated)] // FIXME: Can we make `allow` only apply to the `plugin` crate attribute? #![plugin(script_plugins)] +#![register_attr(allow_unrooted_interior)] +#![register_attr(allow_unrooted_in_rc)] +#![register_attr(must_root)] #[macro_use] extern crate bitflags; diff --git a/components/script_plugins/lib.rs b/components/script_plugins/lib.rs index 740ae9f35ad..d00852b46b5 100644 --- a/components/script_plugins/lib.rs +++ b/components/script_plugins/lib.rs @@ -30,7 +30,6 @@ use rustc::hir::{self, ExprKind, HirId}; use rustc::lint::{LateContext, LateLintPass, LintContext, LintPass}; use rustc::ty; use rustc_driver::plugin::Registry; -use syntax::feature_gate::AttributeType::Whitelisted; use syntax::source_map; use syntax::source_map::{ExpnKind, MacroKind, Span}; use syntax::symbol::sym; @@ -44,9 +43,6 @@ pub fn plugin_registrar(reg: &mut Registry) { fn registrar(reg: &mut Registry) { let symbols = Symbols::new(); - reg.register_attribute(symbols.allow_unrooted_interior, Whitelisted); - reg.register_attribute(symbols.allow_unrooted_in_rc, Whitelisted); - reg.register_attribute(symbols.must_root, Whitelisted); reg.lint_store.register_lints(&[&UNROOTED_MUST_ROOT]); reg.lint_store .register_late_pass(move || Box::new(UnrootedPass::new(symbols.clone()))); diff --git a/rust-toolchain b/rust-toolchain index fc6d4ce593e..b3cc08aa48a 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2019-10-26 +nightly-2019-11-15