Upgrade to rustc 1.40.0-nightly (246be7e1a 2019-10-25)

This commit is contained in:
Simon Sapin 2019-10-26 12:57:14 +02:00
parent 642b8b0415
commit d3439fb4d1
3 changed files with 42 additions and 9 deletions

View file

@ -11,8 +11,9 @@
#![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."]
#![plugin(script_plugins)]
#![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?
#![plugin(script_plugins)]
#[macro_use] #[macro_use]
extern crate bitflags; extern crate bitflags;
@ -47,37 +48,66 @@ extern crate servo_atoms;
#[macro_use] #[macro_use]
extern crate style; extern crate style;
#[warn(deprecated)]
#[macro_use] #[macro_use]
mod task; mod task;
#[warn(deprecated)]
mod body; mod body;
#[warn(deprecated)]
pub mod clipboard_provider; pub mod clipboard_provider;
#[warn(deprecated)]
mod devtools; mod devtools;
#[warn(deprecated)]
pub mod document_loader; pub mod document_loader;
#[warn(deprecated)]
#[macro_use] #[macro_use]
mod dom; mod dom;
#[warn(deprecated)]
mod canvas_state; mod canvas_state;
#[warn(deprecated)]
mod compartments; mod compartments;
#[warn(deprecated)]
pub mod fetch; pub mod fetch;
#[warn(deprecated)]
mod image_listener; mod image_listener;
#[warn(deprecated)]
mod init; mod init;
#[warn(deprecated)]
mod layout_image; mod layout_image;
#[warn(deprecated)]
mod mem; mod mem;
#[warn(deprecated)]
mod microtask; mod microtask;
#[warn(deprecated)]
mod network_listener; mod network_listener;
#[warn(deprecated)]
pub mod script_runtime; pub mod script_runtime;
#[warn(deprecated)]
#[allow(unsafe_code)] #[allow(unsafe_code)]
pub mod script_thread; pub mod script_thread;
#[warn(deprecated)]
mod serviceworker_manager; mod serviceworker_manager;
#[warn(deprecated)]
mod serviceworkerjob; mod serviceworkerjob;
#[warn(deprecated)]
mod stylesheet_loader; mod stylesheet_loader;
#[warn(deprecated)]
mod stylesheet_set; mod stylesheet_set;
#[warn(deprecated)]
mod task_manager; mod task_manager;
#[warn(deprecated)]
mod task_queue; mod task_queue;
#[warn(deprecated)]
mod task_source; mod task_source;
#[warn(deprecated)]
pub mod test; pub mod test;
#[warn(deprecated)]
pub mod textinput; pub mod textinput;
#[warn(deprecated)]
mod timers; mod timers;
#[warn(deprecated)]
mod unpremultiplytable; mod unpremultiplytable;
#[warn(deprecated)]
mod webdriver_handlers; mod webdriver_handlers;
pub use init::{init, init_service_workers}; pub use init::{init, init_service_workers};

View file

@ -27,7 +27,7 @@ extern crate syntax;
use rustc::hir::def_id::DefId; use rustc::hir::def_id::DefId;
use rustc::hir::intravisit as visit; use rustc::hir::intravisit as visit;
use rustc::hir::{self, ExprKind, HirId}; use rustc::hir::{self, ExprKind, HirId};
use rustc::lint::{LateContext, LateLintPass, LintArray, 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::feature_gate::AttributeType::Whitelisted;
@ -36,13 +36,20 @@ use syntax::source_map::{ExpnKind, MacroKind, Span};
use syntax::symbol::sym; use syntax::symbol::sym;
use syntax::symbol::Symbol; use syntax::symbol::Symbol;
#[allow(deprecated)]
#[plugin_registrar] #[plugin_registrar]
pub fn plugin_registrar(reg: &mut Registry) { pub fn plugin_registrar(reg: &mut Registry) {
registrar(reg)
}
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_interior, Whitelisted);
reg.register_attribute(symbols.allow_unrooted_in_rc, Whitelisted); reg.register_attribute(symbols.allow_unrooted_in_rc, Whitelisted);
reg.register_attribute(symbols.must_root, Whitelisted); reg.register_attribute(symbols.must_root, Whitelisted);
reg.register_late_lint_pass(Box::new(UnrootedPass::new(symbols))); reg.lint_store.register_lints(&[&UNROOTED_MUST_ROOT]);
reg.lint_store
.register_late_pass(move || Box::new(UnrootedPass::new(symbols.clone())));
} }
declare_lint!( declare_lint!(
@ -165,10 +172,6 @@ impl LintPass for UnrootedPass {
fn name(&self) -> &'static str { fn name(&self) -> &'static str {
"ServoUnrootedPass" "ServoUnrootedPass"
} }
fn get_lints(&self) -> LintArray {
lint_array!(UNROOTED_MUST_ROOT)
}
} }
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass { impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
@ -360,7 +363,7 @@ fn match_def_path(cx: &LateContext, def_id: DefId, path: &[Symbol]) -> bool {
other other
.into_iter() .into_iter()
.zip(path) .zip(path)
.all(|(e, p)| e.data.as_interned_str().as_symbol() == *p) .all(|(e, p)| e.data.as_symbol() == *p)
} }
fn in_derive_expn(span: Span) -> bool { fn in_derive_expn(span: Span) -> bool {

View file

@ -1 +1 @@
nightly-2019-09-28 nightly-2019-10-26