mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Auto merge of #25739 - servo:rustup, r=paulrouget
Upgrade to rustc 1.43.0-nightly (5d04ce67f 2020-02-13) ~This Nightly doesn’t have rustfmt, so merging this PR is blocked on https://github.com/rust-lang/rust/issues/68917 and upgrading to a Nightly with the fix.~ Fixes #25550
This commit is contained in:
commit
55473eb441
17 changed files with 53 additions and 67 deletions
6
Cargo.lock
generated
6
Cargo.lock
generated
|
@ -3658,7 +3658,6 @@ dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"malloc_size_of",
|
"malloc_size_of",
|
||||||
"malloc_size_of_derive",
|
"malloc_size_of_derive",
|
||||||
"matches",
|
|
||||||
"mime",
|
"mime",
|
||||||
"mime_guess",
|
"mime_guess",
|
||||||
"msg",
|
"msg",
|
||||||
|
@ -4836,9 +4835,6 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "script_plugins"
|
name = "script_plugins"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
dependencies = [
|
|
||||||
"matches",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "script_plugins_tests"
|
name = "script_plugins_tests"
|
||||||
|
@ -4907,7 +4903,6 @@ dependencies = [
|
||||||
"derive_more 0.99.2",
|
"derive_more 0.99.2",
|
||||||
"fxhash",
|
"fxhash",
|
||||||
"log",
|
"log",
|
||||||
"matches",
|
|
||||||
"phf",
|
"phf",
|
||||||
"phf_codegen",
|
"phf_codegen",
|
||||||
"precomputed-hash",
|
"precomputed-hash",
|
||||||
|
@ -5653,7 +5648,6 @@ dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"malloc_size_of",
|
"malloc_size_of",
|
||||||
"malloc_size_of_derive",
|
"malloc_size_of_derive",
|
||||||
"matches",
|
|
||||||
"new_debug_unreachable",
|
"new_debug_unreachable",
|
||||||
"num-derive",
|
"num-derive",
|
||||||
"num-integer",
|
"num-integer",
|
||||||
|
|
|
@ -135,7 +135,7 @@ impl FontInfo {
|
||||||
let strings = table.strings().unwrap();
|
let strings = table.strings().unwrap();
|
||||||
let family = strings[family_index].clone();
|
let family = strings[family_index].clone();
|
||||||
let face = strings[face_index].clone();
|
let face = strings[face_index].clone();
|
||||||
((family, face))
|
(family, face)
|
||||||
} else {
|
} else {
|
||||||
return Err(());
|
return Err(());
|
||||||
}
|
}
|
||||||
|
@ -145,7 +145,7 @@ impl FontInfo {
|
||||||
let strings = table.strings().unwrap();
|
let strings = table.strings().unwrap();
|
||||||
let family = strings[family_index].clone();
|
let family = strings[family_index].clone();
|
||||||
let face = strings[face_index].clone();
|
let face = strings[face_index].clone();
|
||||||
((family, face))
|
(family, face)
|
||||||
} else {
|
} else {
|
||||||
return Err(());
|
return Err(());
|
||||||
}
|
}
|
||||||
|
|
|
@ -944,8 +944,8 @@ impl Fragment {
|
||||||
QuantitiesIncludedInIntrinsicInlineSizes::INTRINSIC_INLINE_SIZE_INCLUDES_MARGINS,
|
QuantitiesIncludedInIntrinsicInlineSizes::INTRINSIC_INLINE_SIZE_INCLUDES_MARGINS,
|
||||||
) {
|
) {
|
||||||
let margin = style.logical_margin();
|
let margin = style.logical_margin();
|
||||||
(MaybeAuto::from_style(margin.inline_start, Au(0)).specified_or_zero() +
|
MaybeAuto::from_style(margin.inline_start, Au(0)).specified_or_zero() +
|
||||||
MaybeAuto::from_style(margin.inline_end, Au(0)).specified_or_zero())
|
MaybeAuto::from_style(margin.inline_end, Au(0)).specified_or_zero()
|
||||||
} else {
|
} else {
|
||||||
Au(0)
|
Au(0)
|
||||||
};
|
};
|
||||||
|
@ -957,7 +957,7 @@ impl Fragment {
|
||||||
QuantitiesIncludedInIntrinsicInlineSizes::INTRINSIC_INLINE_SIZE_INCLUDES_PADDING,
|
QuantitiesIncludedInIntrinsicInlineSizes::INTRINSIC_INLINE_SIZE_INCLUDES_PADDING,
|
||||||
) {
|
) {
|
||||||
let padding = style.logical_padding();
|
let padding = style.logical_padding();
|
||||||
(padding.inline_start.to_used_value(Au(0)) + padding.inline_end.to_used_value(Au(0)))
|
padding.inline_start.to_used_value(Au(0)) + padding.inline_end.to_used_value(Au(0))
|
||||||
} else {
|
} else {
|
||||||
Au(0)
|
Au(0)
|
||||||
};
|
};
|
||||||
|
|
|
@ -38,7 +38,6 @@ libflate = "0.1"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
malloc_size_of = { path = "../malloc_size_of" }
|
malloc_size_of = { path = "../malloc_size_of" }
|
||||||
malloc_size_of_derive = "0.1"
|
malloc_size_of_derive = "0.1"
|
||||||
matches = "0.1"
|
|
||||||
mime = "0.3"
|
mime = "0.3"
|
||||||
mime_guess = "2.0.0-alpha.6"
|
mime_guess = "2.0.0-alpha.6"
|
||||||
msg = {path = "../msg"}
|
msg = {path = "../msg"}
|
||||||
|
|
|
@ -11,8 +11,6 @@ extern crate log;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate malloc_size_of_derive;
|
extern crate malloc_size_of_derive;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate matches;
|
|
||||||
#[macro_use]
|
|
||||||
extern crate profile_traits;
|
extern crate profile_traits;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate serde;
|
extern crate serde;
|
||||||
|
|
|
@ -2834,7 +2834,7 @@ impl ResourceTimingListener for HTMLMediaElementFetchListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn resource_timing_global(&self) -> DomRoot<GlobalScope> {
|
fn resource_timing_global(&self) -> DomRoot<GlobalScope> {
|
||||||
(document_from_node(&*self.elem.root()).global())
|
document_from_node(&*self.elem.root()).global()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -309,7 +309,7 @@ impl ResourceTimingListener for ClassicContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn resource_timing_global(&self) -> DomRoot<GlobalScope> {
|
fn resource_timing_global(&self) -> DomRoot<GlobalScope> {
|
||||||
(document_from_node(&*self.elem.root()).global())
|
document_from_node(&*self.elem.root()).global()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,3 @@ plugin = true
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
unrooted_must_root_lint = []
|
unrooted_must_root_lint = []
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
matches = "0.1"
|
|
||||||
|
|
|
@ -19,8 +19,6 @@
|
||||||
#![feature(rustc_private)]
|
#![feature(rustc_private)]
|
||||||
#![cfg(feature = "unrooted_must_root_lint")]
|
#![cfg(feature = "unrooted_must_root_lint")]
|
||||||
|
|
||||||
#[macro_use]
|
|
||||||
extern crate matches;
|
|
||||||
extern crate rustc;
|
extern crate rustc;
|
||||||
extern crate rustc_driver;
|
extern crate rustc_driver;
|
||||||
extern crate rustc_hir;
|
extern crate rustc_hir;
|
||||||
|
@ -204,12 +202,14 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
|
||||||
for ref field in def.fields() {
|
for ref field in def.fields() {
|
||||||
let def_id = cx.tcx.hir().local_def_id(field.hir_id);
|
let def_id = cx.tcx.hir().local_def_id(field.hir_id);
|
||||||
if is_unrooted_ty(&self.symbols, cx, cx.tcx.type_of(def_id), false) {
|
if is_unrooted_ty(&self.symbols, cx, cx.tcx.type_of(def_id), false) {
|
||||||
cx.span_lint(
|
cx.lint(UNROOTED_MUST_ROOT, |lint| {
|
||||||
UNROOTED_MUST_ROOT,
|
lint.build(
|
||||||
field.span,
|
|
||||||
"Type must be rooted, use #[unrooted_must_root_lint::must_root] \
|
"Type must be rooted, use #[unrooted_must_root_lint::must_root] \
|
||||||
on the struct definition to propagate",
|
on the struct definition to propagate",
|
||||||
)
|
)
|
||||||
|
.set_span(field.span)
|
||||||
|
.emit()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -226,12 +226,15 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
|
||||||
for field in fields {
|
for field in fields {
|
||||||
let def_id = cx.tcx.hir().local_def_id(field.hir_id);
|
let def_id = cx.tcx.hir().local_def_id(field.hir_id);
|
||||||
if is_unrooted_ty(&self.symbols, cx, cx.tcx.type_of(def_id), false) {
|
if is_unrooted_ty(&self.symbols, cx, cx.tcx.type_of(def_id), false) {
|
||||||
cx.span_lint(
|
cx.lint(UNROOTED_MUST_ROOT, |lint| {
|
||||||
UNROOTED_MUST_ROOT,
|
lint.build(
|
||||||
field.ty.span,
|
"Type must be rooted, \
|
||||||
"Type must be rooted, use #[unrooted_must_root_lint::must_root] on \
|
use #[unrooted_must_root_lint::must_root] \
|
||||||
the enum definition to propagate",
|
on the enum definition to propagate",
|
||||||
)
|
)
|
||||||
|
.set_span(field.ty.span)
|
||||||
|
.emit()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -262,17 +265,19 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
|
||||||
|
|
||||||
for (arg, ty) in decl.inputs.iter().zip(sig.inputs().skip_binder().iter()) {
|
for (arg, ty) in decl.inputs.iter().zip(sig.inputs().skip_binder().iter()) {
|
||||||
if is_unrooted_ty(&self.symbols, cx, ty, false) {
|
if is_unrooted_ty(&self.symbols, cx, ty, false) {
|
||||||
cx.span_lint(UNROOTED_MUST_ROOT, arg.span, "Type must be rooted")
|
cx.lint(UNROOTED_MUST_ROOT, |lint| {
|
||||||
|
lint.build("Type must be rooted").set_span(arg.span).emit()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if !in_new_function {
|
if !in_new_function {
|
||||||
if is_unrooted_ty(&self.symbols, cx, sig.output().skip_binder(), false) {
|
if is_unrooted_ty(&self.symbols, cx, sig.output().skip_binder(), false) {
|
||||||
cx.span_lint(
|
cx.lint(UNROOTED_MUST_ROOT, |lint| {
|
||||||
UNROOTED_MUST_ROOT,
|
lint.build("Type must be rooted")
|
||||||
decl.output.span(),
|
.set_span(decl.output.span())
|
||||||
"Type must be rooted",
|
.emit()
|
||||||
)
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -301,11 +306,11 @@ impl<'a, 'b, 'tcx> visit::Visitor<'tcx> for FnDefVisitor<'a, 'b, 'tcx> {
|
||||||
let require_rooted = |cx: &LateContext, in_new_function: bool, subexpr: &hir::Expr| {
|
let require_rooted = |cx: &LateContext, in_new_function: bool, subexpr: &hir::Expr| {
|
||||||
let ty = cx.tables.expr_ty(&subexpr);
|
let ty = cx.tables.expr_ty(&subexpr);
|
||||||
if is_unrooted_ty(&self.symbols, cx, ty, in_new_function) {
|
if is_unrooted_ty(&self.symbols, cx, ty, in_new_function) {
|
||||||
cx.span_lint(
|
cx.lint(UNROOTED_MUST_ROOT, |lint| {
|
||||||
UNROOTED_MUST_ROOT,
|
lint.build(&format!("Expression of type {:?} must be rooted", ty))
|
||||||
subexpr.span,
|
.set_span(subexpr.span)
|
||||||
&format!("Expression of type {:?} must be rooted", ty),
|
.emit()
|
||||||
)
|
})
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -343,11 +348,11 @@ impl<'a, 'b, 'tcx> visit::Visitor<'tcx> for FnDefVisitor<'a, 'b, 'tcx> {
|
||||||
hir::PatKind::Binding(hir::BindingAnnotation::Mutable, ..) => {
|
hir::PatKind::Binding(hir::BindingAnnotation::Mutable, ..) => {
|
||||||
let ty = cx.tables.pat_ty(pat);
|
let ty = cx.tables.pat_ty(pat);
|
||||||
if is_unrooted_ty(&self.symbols, cx, ty, self.in_new_function) {
|
if is_unrooted_ty(&self.symbols, cx, ty, self.in_new_function) {
|
||||||
cx.span_lint(
|
cx.lint(UNROOTED_MUST_ROOT, |lint| {
|
||||||
UNROOTED_MUST_ROOT,
|
lint.build(&format!("Expression of type {:?} must be rooted", ty))
|
||||||
pat.span,
|
.set_span(pat.span)
|
||||||
&format!("Expression of type {:?} must be rooted", ty),
|
.emit()
|
||||||
)
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_ => {},
|
_ => {},
|
||||||
|
@ -388,11 +393,10 @@ fn match_def_path(cx: &LateContext, def_id: DefId, path: &[Symbol]) -> bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn in_derive_expn(span: Span) -> bool {
|
fn in_derive_expn(span: Span) -> bool {
|
||||||
if let ExpnKind::Macro(MacroKind::Attr, n) = span.ctxt().outer_expn_data().kind {
|
matches!(
|
||||||
n.as_str().contains("derive")
|
span.ctxt().outer_expn_data().kind,
|
||||||
} else {
|
ExpnKind::Macro(MacroKind::Derive, _)
|
||||||
false
|
)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! symbols {
|
macro_rules! symbols {
|
||||||
|
|
|
@ -21,7 +21,6 @@ bench = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bitflags = "1.0"
|
bitflags = "1.0"
|
||||||
matches = "0.1"
|
|
||||||
cssparser = "0.27"
|
cssparser = "0.27"
|
||||||
derive_more = "0.99"
|
derive_more = "0.99"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
|
|
|
@ -14,8 +14,6 @@ extern crate derive_more;
|
||||||
extern crate fxhash;
|
extern crate fxhash;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate log;
|
extern crate log;
|
||||||
#[macro_use]
|
|
||||||
extern crate matches;
|
|
||||||
extern crate phf;
|
extern crate phf;
|
||||||
extern crate precomputed_hash;
|
extern crate precomputed_hash;
|
||||||
extern crate servo_arc;
|
extern crate servo_arc;
|
||||||
|
|
|
@ -50,7 +50,6 @@ lazy_static = "1"
|
||||||
log = { version = "0.4", features = ["std"] }
|
log = { version = "0.4", features = ["std"] }
|
||||||
malloc_size_of = { path = "../malloc_size_of" }
|
malloc_size_of = { path = "../malloc_size_of" }
|
||||||
malloc_size_of_derive = "0.1"
|
malloc_size_of_derive = "0.1"
|
||||||
matches = "0.1"
|
|
||||||
num_cpus = {version = "1.1.0"}
|
num_cpus = {version = "1.1.0"}
|
||||||
num-integer = "0.1"
|
num-integer = "0.1"
|
||||||
num-traits = "0.2"
|
num-traits = "0.2"
|
||||||
|
|
|
@ -61,9 +61,6 @@ extern crate log;
|
||||||
extern crate malloc_size_of;
|
extern crate malloc_size_of;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate malloc_size_of_derive;
|
extern crate malloc_size_of_derive;
|
||||||
#[allow(unused_extern_crates)]
|
|
||||||
#[macro_use]
|
|
||||||
extern crate matches;
|
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
pub extern crate nsstring;
|
pub extern crate nsstring;
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
|
|
|
@ -388,7 +388,8 @@ macro_rules! sheet_set_methods {
|
||||||
guard: &SharedRwLockReadGuard,
|
guard: &SharedRwLockReadGuard,
|
||||||
) {
|
) {
|
||||||
if let Some(device) = device {
|
if let Some(device) = device {
|
||||||
self.invalidations.collect_invalidations_for(device, sheet, guard);
|
self.invalidations
|
||||||
|
.collect_invalidations_for(device, sheet, guard);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -435,7 +436,7 @@ macro_rules! sheet_set_methods {
|
||||||
let collection = self.collection_for(&sheet, guard);
|
let collection = self.collection_for(&sheet, guard);
|
||||||
collection.remove(&sheet)
|
collection.remove(&sheet)
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S> DocumentStylesheetSet<S>
|
impl<S> DocumentStylesheetSet<S>
|
||||||
|
|
|
@ -80,7 +80,7 @@ macro_rules! computed_length_percentage_or_auto {
|
||||||
generics::GenericLengthPercentageOrAuto::Auto => None,
|
generics::GenericLengthPercentageOrAuto::Auto => None,
|
||||||
generics::GenericLengthPercentageOrAuto::LengthPercentage(ref lp) => {
|
generics::GenericLengthPercentageOrAuto::LengthPercentage(ref lp) => {
|
||||||
Some(lp.to_used_value(percentage_basis))
|
Some(lp.to_used_value(percentage_basis))
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ macro_rules! computed_length_percentage_or_auto {
|
||||||
Auto => false,
|
Auto => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A computed type for `<length-percentage> | auto`.
|
/// A computed type for `<length-percentage> | auto`.
|
||||||
|
|
|
@ -61,7 +61,7 @@ macro_rules! system_font_methods {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const DEFAULT_SCRIPT_MIN_SIZE_PT: u32 = 8;
|
const DEFAULT_SCRIPT_MIN_SIZE_PT: u32 = 8;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
nightly-2020-01-16
|
nightly-2020-02-14
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue