mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Use #![register_attr(…)]
instead of Registry::register_attribute
CC https://github.com/rust-lang/rust/pull/66344, https://github.com/rust-lang/rust/issues/66080
This commit is contained in:
parent
b9cdf9ebda
commit
091feba0ba
3 changed files with 5 additions and 5 deletions
|
@ -7,12 +7,16 @@
|
||||||
#![feature(drain_filter)]
|
#![feature(drain_filter)]
|
||||||
#![feature(inner_deref)]
|
#![feature(inner_deref)]
|
||||||
#![feature(plugin)]
|
#![feature(plugin)]
|
||||||
|
#![feature(register_attr)]
|
||||||
#![deny(unsafe_code)]
|
#![deny(unsafe_code)]
|
||||||
#![allow(non_snake_case)]
|
#![allow(non_snake_case)]
|
||||||
#![doc = "The script crate contains all matters DOM."]
|
#![doc = "The script crate contains all matters DOM."]
|
||||||
#![cfg_attr(not(feature = "unrooted_must_root_lint"), allow(unknown_lints))]
|
#![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?
|
#![allow(deprecated)] // FIXME: Can we make `allow` only apply to the `plugin` crate attribute?
|
||||||
#![plugin(script_plugins)]
|
#![plugin(script_plugins)]
|
||||||
|
#![register_attr(allow_unrooted_interior)]
|
||||||
|
#![register_attr(allow_unrooted_in_rc)]
|
||||||
|
#![register_attr(must_root)]
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate bitflags;
|
extern crate bitflags;
|
||||||
|
|
|
@ -30,7 +30,6 @@ use rustc::hir::{self, ExprKind, HirId};
|
||||||
use rustc::lint::{LateContext, LateLintPass, LintContext, LintPass};
|
use rustc::lint::{LateContext, LateLintPass, LintContext, LintPass};
|
||||||
use rustc::ty;
|
use rustc::ty;
|
||||||
use rustc_driver::plugin::Registry;
|
use rustc_driver::plugin::Registry;
|
||||||
use syntax::feature_gate::AttributeType::Whitelisted;
|
|
||||||
use syntax::source_map;
|
use syntax::source_map;
|
||||||
use syntax::source_map::{ExpnKind, MacroKind, Span};
|
use syntax::source_map::{ExpnKind, MacroKind, Span};
|
||||||
use syntax::symbol::sym;
|
use syntax::symbol::sym;
|
||||||
|
@ -44,9 +43,6 @@ pub fn plugin_registrar(reg: &mut Registry) {
|
||||||
|
|
||||||
fn registrar(reg: &mut Registry) {
|
fn registrar(reg: &mut Registry) {
|
||||||
let symbols = Symbols::new();
|
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_lints(&[&UNROOTED_MUST_ROOT]);
|
||||||
reg.lint_store
|
reg.lint_store
|
||||||
.register_late_pass(move || Box::new(UnrootedPass::new(symbols.clone())));
|
.register_late_pass(move || Box::new(UnrootedPass::new(symbols.clone())));
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
nightly-2019-10-26
|
nightly-2019-11-15
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue