mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
Auto merge of #22937 - servo:rustup, r=nox
Upgrade to rustc 1.34.0-nightly (097c04cf4 2019-02-24) <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22937) <!-- Reviewable:end -->
This commit is contained in:
commit
be3ecc5dc1
11 changed files with 52 additions and 31 deletions
|
@ -3127,7 +3127,9 @@ where
|
||||||
let control_msg = ConstellationControlMsg::WebDriverScriptCommand(pipeline_id, cmd);
|
let control_msg = ConstellationControlMsg::WebDriverScriptCommand(pipeline_id, cmd);
|
||||||
let result = match self.pipelines.get(&pipeline_id) {
|
let result = match self.pipelines.get(&pipeline_id) {
|
||||||
Some(pipeline) => pipeline.event_loop.send(control_msg),
|
Some(pipeline) => pipeline.event_loop.send(control_msg),
|
||||||
None => return warn!("Pipeline {:?} ScriptCommand after closure.", pipeline_id),
|
None => {
|
||||||
|
return warn!("Pipeline {:?} ScriptCommand after closure.", pipeline_id)
|
||||||
|
},
|
||||||
};
|
};
|
||||||
if let Err(e) = result {
|
if let Err(e) = result {
|
||||||
self.handle_send_error(pipeline_id, e);
|
self.handle_send_error(pipeline_id, e);
|
||||||
|
|
|
@ -1658,7 +1658,9 @@ impl Fragment {
|
||||||
handle_text(text_fragment_info, self, &mut result)
|
handle_text(text_fragment_info, self, &mut result)
|
||||||
},
|
},
|
||||||
|
|
||||||
SpecificFragmentInfo::TruncatedFragment(_) => return IntrinsicISizesContribution::new(),
|
SpecificFragmentInfo::TruncatedFragment(_) => {
|
||||||
|
return IntrinsicISizesContribution::new()
|
||||||
|
},
|
||||||
|
|
||||||
SpecificFragmentInfo::UnscannedText(..) => {
|
SpecificFragmentInfo::UnscannedText(..) => {
|
||||||
panic!("Unscanned text fragments should have been scanned by now!")
|
panic!("Unscanned text fragments should have been scanned by now!")
|
||||||
|
|
|
@ -93,7 +93,9 @@ where
|
||||||
|
|
||||||
let property = match T::from_jsval(cx, property.handle(), config.clone())? {
|
let property = match T::from_jsval(cx, property.handle(), config.clone())? {
|
||||||
ConversionResult::Success(property) => property,
|
ConversionResult::Success(property) => property,
|
||||||
ConversionResult::Failure(message) => return Ok(ConversionResult::Failure(message)),
|
ConversionResult::Failure(message) => {
|
||||||
|
return Ok(ConversionResult::Failure(message))
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: Is this guaranteed to succeed?
|
// TODO: Is this guaranteed to succeed?
|
||||||
|
|
|
@ -2533,13 +2533,14 @@ impl ElementMethods for Element {
|
||||||
let position = position.parse::<AdjacentPosition>()?;
|
let position = position.parse::<AdjacentPosition>()?;
|
||||||
|
|
||||||
let context = match position {
|
let context = match position {
|
||||||
AdjacentPosition::BeforeBegin | AdjacentPosition::AfterEnd => match self
|
AdjacentPosition::BeforeBegin | AdjacentPosition::AfterEnd => {
|
||||||
.upcast::<Node>()
|
match self.upcast::<Node>().GetParentNode() {
|
||||||
.GetParentNode()
|
Some(ref node) if node.is::<Document>() => {
|
||||||
{
|
return Err(Error::NoModificationAllowed)
|
||||||
Some(ref node) if node.is::<Document>() => return Err(Error::NoModificationAllowed),
|
},
|
||||||
None => return Err(Error::NoModificationAllowed),
|
None => return Err(Error::NoModificationAllowed),
|
||||||
Some(node) => node,
|
Some(node) => node,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
AdjacentPosition::AfterBegin | AdjacentPosition::BeforeEnd => {
|
AdjacentPosition::AfterBegin | AdjacentPosition::BeforeEnd => {
|
||||||
DomRoot::from_ref(self.upcast::<Node>())
|
DomRoot::from_ref(self.upcast::<Node>())
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
use crate::utils::{in_derive_expn, match_def_path};
|
use crate::utils::{in_derive_expn, match_def_path};
|
||||||
use rustc::hir::intravisit as visit;
|
use rustc::hir::intravisit as visit;
|
||||||
use rustc::hir::{self, ExprKind};
|
use rustc::hir::{self, ExprKind, HirId};
|
||||||
use rustc::lint::{LateContext, LateLintPass, LintArray, LintContext, LintPass};
|
use rustc::lint::{LateContext, LateLintPass, LintArray, LintContext, LintPass};
|
||||||
use rustc::ty;
|
use rustc::ty;
|
||||||
use syntax::{ast, source_map};
|
use syntax::{ast, source_map};
|
||||||
|
@ -113,15 +113,18 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
|
||||||
/// All structs containing #[must_root] types must be #[must_root] themselves
|
/// All structs containing #[must_root] types must be #[must_root] themselves
|
||||||
fn check_struct_def(
|
fn check_struct_def(
|
||||||
&mut self,
|
&mut self,
|
||||||
cx: &LateContext,
|
cx: &LateContext<'a, 'tcx>,
|
||||||
def: &hir::VariantData,
|
def: &'tcx hir::VariantData,
|
||||||
_n: ast::Name,
|
_n: ast::Name,
|
||||||
_gen: &hir::Generics,
|
_gen: &'tcx hir::Generics,
|
||||||
id: ast::NodeId,
|
id: HirId,
|
||||||
) {
|
) {
|
||||||
let item = match cx.tcx.hir().get(id) {
|
let item = match cx.tcx.hir().get_by_hir_id(id) {
|
||||||
hir::Node::Item(item) => item,
|
hir::Node::Item(item) => item,
|
||||||
_ => cx.tcx.hir().expect_item(cx.tcx.hir().get_parent(id)),
|
_ => cx
|
||||||
|
.tcx
|
||||||
|
.hir()
|
||||||
|
.expect_item_by_hir_id(cx.tcx.hir().get_parent_item(id)),
|
||||||
};
|
};
|
||||||
if item.attrs.iter().all(|a| !a.check_name("must_root")) {
|
if item.attrs.iter().all(|a| !a.check_name("must_root")) {
|
||||||
for ref field in def.fields() {
|
for ref field in def.fields() {
|
||||||
|
@ -165,11 +168,11 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
|
||||||
fn check_fn(
|
fn check_fn(
|
||||||
&mut self,
|
&mut self,
|
||||||
cx: &LateContext<'a, 'tcx>,
|
cx: &LateContext<'a, 'tcx>,
|
||||||
kind: visit::FnKind,
|
kind: visit::FnKind<'tcx>,
|
||||||
decl: &'tcx hir::FnDecl,
|
decl: &'tcx hir::FnDecl,
|
||||||
body: &'tcx hir::Body,
|
body: &'tcx hir::Body,
|
||||||
span: source_map::Span,
|
span: source_map::Span,
|
||||||
id: ast::NodeId,
|
id: HirId,
|
||||||
) {
|
) {
|
||||||
let in_new_function = match kind {
|
let in_new_function = match kind {
|
||||||
visit::FnKind::ItemFn(n, _, _, _, _) | visit::FnKind::Method(n, _, _, _) => {
|
visit::FnKind::ItemFn(n, _, _, _, _) | visit::FnKind::Method(n, _, _, _) => {
|
||||||
|
@ -179,7 +182,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
|
||||||
};
|
};
|
||||||
|
|
||||||
if !in_derive_expn(span) {
|
if !in_derive_expn(span) {
|
||||||
let def_id = cx.tcx.hir().local_def_id(id);
|
let def_id = cx.tcx.hir().local_def_id_from_hir_id(id);
|
||||||
let sig = cx.tcx.type_of(def_id).fn_sig(cx.tcx);
|
let sig = cx.tcx.type_of(def_id).fn_sig(cx.tcx);
|
||||||
|
|
||||||
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()) {
|
||||||
|
|
|
@ -1959,8 +1959,9 @@ where
|
||||||
let name = match input.next_including_whitespace()? {
|
let name = match input.next_including_whitespace()? {
|
||||||
&Token::Ident(ref name) => name.clone(),
|
&Token::Ident(ref name) => name.clone(),
|
||||||
t => {
|
t => {
|
||||||
return Err(location
|
return Err(location.new_custom_error(
|
||||||
.new_custom_error(SelectorParseErrorKind::NoIdentForPseudo(t.clone())));
|
SelectorParseErrorKind::NoIdentForPseudo(t.clone()),
|
||||||
|
));
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -180,7 +180,9 @@ impl CalcNode {
|
||||||
) => {
|
) => {
|
||||||
return NoCalcLength::parse_dimension(context, value, unit)
|
return NoCalcLength::parse_dimension(context, value, unit)
|
||||||
.map(CalcNode::Length)
|
.map(CalcNode::Length)
|
||||||
.map_err(|()| location.new_custom_error(StyleParseErrorKind::UnspecifiedError));
|
.map_err(|()| {
|
||||||
|
location.new_custom_error(StyleParseErrorKind::UnspecifiedError)
|
||||||
|
});
|
||||||
},
|
},
|
||||||
(
|
(
|
||||||
&Token::Dimension {
|
&Token::Dimension {
|
||||||
|
@ -190,7 +192,9 @@ impl CalcNode {
|
||||||
) => {
|
) => {
|
||||||
return Angle::parse_dimension(value, unit, /* from_calc = */ true)
|
return Angle::parse_dimension(value, unit, /* from_calc = */ true)
|
||||||
.map(CalcNode::Angle)
|
.map(CalcNode::Angle)
|
||||||
.map_err(|()| location.new_custom_error(StyleParseErrorKind::UnspecifiedError));
|
.map_err(|()| {
|
||||||
|
location.new_custom_error(StyleParseErrorKind::UnspecifiedError)
|
||||||
|
});
|
||||||
},
|
},
|
||||||
(
|
(
|
||||||
&Token::Dimension {
|
&Token::Dimension {
|
||||||
|
@ -200,7 +204,9 @@ impl CalcNode {
|
||||||
) => {
|
) => {
|
||||||
return Time::parse_dimension(value, unit, /* from_calc = */ true)
|
return Time::parse_dimension(value, unit, /* from_calc = */ true)
|
||||||
.map(CalcNode::Time)
|
.map(CalcNode::Time)
|
||||||
.map_err(|()| location.new_custom_error(StyleParseErrorKind::UnspecifiedError));
|
.map_err(|()| {
|
||||||
|
location.new_custom_error(StyleParseErrorKind::UnspecifiedError)
|
||||||
|
});
|
||||||
},
|
},
|
||||||
(&Token::Percentage { unit_value, .. }, CalcUnit::LengthPercentage) |
|
(&Token::Percentage { unit_value, .. }, CalcUnit::LengthPercentage) |
|
||||||
(&Token::Percentage { unit_value, .. }, CalcUnit::Percentage) => {
|
(&Token::Percentage { unit_value, .. }, CalcUnit::Percentage) => {
|
||||||
|
|
|
@ -274,8 +274,9 @@ impl Color {
|
||||||
if ident.len() != 3 && ident.len() != 6 {
|
if ident.len() != 3 && ident.len() != 6 {
|
||||||
return Err(location.new_custom_error(StyleParseErrorKind::UnspecifiedError));
|
return Err(location.new_custom_error(StyleParseErrorKind::UnspecifiedError));
|
||||||
}
|
}
|
||||||
return parse_hash_color(ident.as_bytes())
|
return parse_hash_color(ident.as_bytes()).map_err(|()| {
|
||||||
.map_err(|()| location.new_custom_error(StyleParseErrorKind::UnspecifiedError));
|
location.new_custom_error(StyleParseErrorKind::UnspecifiedError)
|
||||||
|
});
|
||||||
},
|
},
|
||||||
ref t => {
|
ref t => {
|
||||||
return Err(location.new_unexpected_token_error(t.clone()));
|
return Err(location.new_unexpected_token_error(t.clone()));
|
||||||
|
|
|
@ -614,7 +614,9 @@ impl Length {
|
||||||
!context.parsing_mode.allows_unitless_lengths() &&
|
!context.parsing_mode.allows_unitless_lengths() &&
|
||||||
!allow_quirks.allowed(context.quirks_mode)
|
!allow_quirks.allowed(context.quirks_mode)
|
||||||
{
|
{
|
||||||
return Err(location.new_custom_error(StyleParseErrorKind::UnspecifiedError));
|
return Err(
|
||||||
|
location.new_custom_error(StyleParseErrorKind::UnspecifiedError)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return Ok(Length::NoCalc(NoCalcLength::Absolute(AbsoluteLength::Px(
|
return Ok(Length::NoCalc(NoCalcLength::Absolute(AbsoluteLength::Px(
|
||||||
value,
|
value,
|
||||||
|
|
|
@ -93,8 +93,9 @@ impl Time {
|
||||||
Ok(&Token::Dimension {
|
Ok(&Token::Dimension {
|
||||||
value, ref unit, ..
|
value, ref unit, ..
|
||||||
}) if clamping_mode.is_ok(ParsingMode::DEFAULT, value) => {
|
}) if clamping_mode.is_ok(ParsingMode::DEFAULT, value) => {
|
||||||
return Time::parse_dimension(value, unit, /* from_calc = */ false)
|
return Time::parse_dimension(value, unit, /* from_calc = */ false).map_err(|()| {
|
||||||
.map_err(|()| location.new_custom_error(StyleParseErrorKind::UnspecifiedError));
|
location.new_custom_error(StyleParseErrorKind::UnspecifiedError)
|
||||||
|
});
|
||||||
},
|
},
|
||||||
Ok(&Token::Function(ref name)) if name.eq_ignore_ascii_case("calc") => {},
|
Ok(&Token::Function(ref name)) if name.eq_ignore_ascii_case("calc") => {},
|
||||||
Ok(t) => return Err(location.new_unexpected_token_error(t.clone())),
|
Ok(t) => return Err(location.new_unexpected_token_error(t.clone())),
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
nightly-2019-01-28
|
nightly-2019-02-25
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue