Skip to content

Commit

Permalink
Upgrade to rustc 1.39.0-nightly (f7af19c27 2019-08-15)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSapin committed Aug 23, 2019
1 parent 8672ab5 commit 98e4a53
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 55 deletions.
78 changes: 39 additions & 39 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion components/canvas/canvas_data.rs
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions components/script/dom/bindings/codegen/CodegenRust.py
Expand Up @@ -6384,7 +6384,7 @@ def impl(self):
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"
Expand Down Expand Up @@ -6532,7 +6532,7 @@ def indent(s):
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"
Expand Down Expand Up @@ -7304,7 +7304,7 @@ def getCallableDecl(self):
"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'
Expand Down
2 changes: 1 addition & 1 deletion components/script/dom/htmlinputelement.rs
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions components/script_plugins/unrooted_must_root.rs
Expand Up @@ -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);
Expand Down
23 changes: 16 additions & 7 deletions components/style/stylesheets/viewport_rule.rs
Expand Up @@ -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 {
Expand All @@ -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,
}),
])
}};
}
Expand Down
2 changes: 1 addition & 1 deletion ports/glutin/headed_window.rs
Expand Up @@ -671,7 +671,7 @@ fn winit_phase_to_touch_event_type(phase: TouchPhase) -> TouchEventType {
fn load_icon(icon_bytes: &[u8]) -> Icon {
let (icon_rgba, icon_width, icon_height) = {
use image::{GenericImageView, Pixel};
let image = image::load_from_memory(icon_bytes).expect("Failed to load icon");;
let image = image::load_from_memory(icon_bytes).expect("Failed to load icon");
let (width, height) = image.dimensions();
let mut rgba = Vec::with_capacity((width * height) as usize * 4);
for (_, _, pixel) in image.pixels() {
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
@@ -1 +1 @@
nightly-2019-07-31
nightly-2019-08-16

0 comments on commit 98e4a53

Please sign in to comment.