mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Upgrade to rustc 1.39.0-nightly (f7af19c27 2019-08-15)
This commit is contained in:
parent
8672ab5447
commit
98e4a53b72
8 changed files with 64 additions and 55 deletions
|
@ -421,7 +421,7 @@ impl<'a> CanvasData<'a> {
|
|||
canvas_id: CanvasId,
|
||||
) -> CanvasData<'a> {
|
||||
let backend = create_backend();
|
||||
let draw_target = backend.create_drawtarget(size);;
|
||||
let draw_target = backend.create_drawtarget(size);
|
||||
let webrender_api = webrender_api_sender.create_api();
|
||||
CanvasData {
|
||||
backend,
|
||||
|
|
|
@ -6384,7 +6384,7 @@ class CGDictionary(CGThing):
|
|||
d = self.dictionary
|
||||
if d.parent:
|
||||
initParent = ("{\n"
|
||||
" match r#try!(%s::%s::new(cx, val)) {\n"
|
||||
" match %s::%s::new(cx, val)? {\n"
|
||||
" ConversionResult::Success(v) => v,\n"
|
||||
" ConversionResult::Failure(error) => {\n"
|
||||
" throw_type_error(*cx, &error);\n"
|
||||
|
@ -6532,7 +6532,7 @@ class CGDictionary(CGThing):
|
|||
conversion = (
|
||||
"{\n"
|
||||
" rooted!(in(*cx) let mut rval = UndefinedValue());\n"
|
||||
" if r#try!(get_dictionary_property(*cx, object.handle(), \"%s\", rval.handle_mut()))"
|
||||
" if get_dictionary_property(*cx, object.handle(), \"%s\", rval.handle_mut())?"
|
||||
" && !rval.is_undefined() {\n"
|
||||
"%s\n"
|
||||
" } else {\n"
|
||||
|
@ -7304,7 +7304,7 @@ class CallbackOperationBase(CallbackMethod):
|
|||
"methodName": self.methodName
|
||||
}
|
||||
getCallableFromProp = string.Template(
|
||||
'r#try!(self.parent.get_callable_property(cx, "${methodName}"))'
|
||||
'self.parent.get_callable_property(cx, "${methodName}")?'
|
||||
).substitute(replacements)
|
||||
if not self.singleOperation:
|
||||
return 'rooted!(in(*cx) let callable =\n' + getCallableFromProp + ');\n'
|
||||
|
|
|
@ -1640,7 +1640,7 @@ impl Activatable for HTMLInputElement {
|
|||
let owner = self.form_owner();
|
||||
let doc = document_from_node(self);
|
||||
let doc_node = doc.upcast::<Node>();
|
||||
let group = self.radio_group_name();;
|
||||
let group = self.radio_group_name();
|
||||
|
||||
// Safe since we only manipulate the DOM tree after finding an element
|
||||
let checked_member = doc_node
|
||||
|
|
|
@ -174,12 +174,12 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
|
|||
fn check_variant(&mut self, cx: &LateContext, var: &hir::Variant, _gen: &hir::Generics) {
|
||||
let ref map = cx.tcx.hir();
|
||||
if map
|
||||
.expect_item(map.get_parent_item(var.node.id))
|
||||
.expect_item(map.get_parent_item(var.id))
|
||||
.attrs
|
||||
.iter()
|
||||
.all(|a| !a.check_name(self.symbols.must_root))
|
||||
{
|
||||
match var.node.data {
|
||||
match var.data {
|
||||
hir::VariantData::Tuple(ref fields, ..) => {
|
||||
for ref field in fields {
|
||||
let def_id = cx.tcx.hir().local_def_id(field.hir_id);
|
||||
|
|
|
@ -291,15 +291,18 @@ impl<'a, 'b, 'i> DeclarationParser<'i> for ViewportRuleParser<'a, 'b> {
|
|||
) -> Result<Vec<ViewportDescriptorDeclaration>, ParseError<'i>> {
|
||||
macro_rules! declaration {
|
||||
($declaration:ident($parse:expr)) => {
|
||||
declaration!($declaration(value: try!($parse(input)),
|
||||
important: input.try(parse_important).is_ok()))
|
||||
declaration!($declaration {
|
||||
value: $parse(input)?,
|
||||
important: input.try(parse_important).is_ok(),
|
||||
})
|
||||
};
|
||||
($declaration:ident(value: $value:expr, important: $important:expr)) => {
|
||||
($declaration:ident { value: $value:expr, important: $important:expr, }) => {
|
||||
ViewportDescriptorDeclaration::new(
|
||||
self.context.stylesheet_origin,
|
||||
ViewportDescriptor::$declaration($value),
|
||||
$important)
|
||||
}
|
||||
$important,
|
||||
)
|
||||
};
|
||||
}
|
||||
|
||||
macro_rules! ok {
|
||||
|
@ -311,8 +314,14 @@ impl<'a, 'b, 'i> DeclarationParser<'i> for ViewportRuleParser<'a, 'b> {
|
|||
let important = input.try(parse_important).is_ok();
|
||||
|
||||
Ok(vec![
|
||||
declaration!($min(value: shorthand.0, important: important)),
|
||||
declaration!($max(value: shorthand.1, important: important)),
|
||||
declaration!($min {
|
||||
value: shorthand.0,
|
||||
important: important,
|
||||
}),
|
||||
declaration!($max {
|
||||
value: shorthand.1,
|
||||
important: important,
|
||||
}),
|
||||
])
|
||||
}};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue