From 0c726b45813c9596801470108ce13395f046cc7e Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Fri, 30 Aug 2013 17:15:21 +0100 Subject: [PATCH] Upgrade to rustc 0.8-pre (0ac3e02 2013-08-30 05:45:45 -0700) --- src/compiler/rust | 2 +- src/components/gfx/text/shaping/harfbuzz.rs | 2 +- src/components/main/layout/layout_task.rs | 2 +- .../dom/bindings/codegen/CodegenRust.py | 4 +-- src/components/util/tree.rs | 32 +++++++++++-------- src/platform/macos/rust-core-foundation | 2 +- src/platform/macos/rust-core-graphics | 2 +- src/platform/macos/rust-core-text | 2 +- src/platform/macos/rust-io-surface | 2 +- src/support/netsurfcss/rust-netsurfcss | 2 +- src/support/spidermonkey/rust-mozjs | 2 +- 11 files changed, 30 insertions(+), 24 deletions(-) diff --git a/src/compiler/rust b/src/compiler/rust index c822d1070ac..0ac3e023d86 160000 --- a/src/compiler/rust +++ b/src/compiler/rust @@ -1 +1 @@ -Subproject commit c822d1070ac39871165df30ac8d09e733a6e7fb9 +Subproject commit 0ac3e023d86fa84ed38bca3d34003b494fd28acf diff --git a/src/components/gfx/text/shaping/harfbuzz.rs b/src/components/gfx/text/shaping/harfbuzz.rs index 3ef24173851..cfc6630a49b 100644 --- a/src/components/gfx/text/shaping/harfbuzz.rs +++ b/src/components/gfx/text/shaping/harfbuzz.rs @@ -86,8 +86,8 @@ impl ShapedGlyphData { fn byte_offset_of_glyph(&self, i: uint) -> uint { assert!(i < self.count); - let glyph_info_i = ptr::offset(self.glyph_infos, i as int); unsafe { + let glyph_info_i = ptr::offset(self.glyph_infos, i as int); (*glyph_info_i).cluster as uint } } diff --git a/src/components/main/layout/layout_task.rs b/src/components/main/layout/layout_task.rs index 141df0e3f33..43751ddbc55 100644 --- a/src/components/main/layout/layout_task.rs +++ b/src/components/main/layout/layout_task.rs @@ -307,7 +307,7 @@ impl LayoutTask { ctx: &layout_ctx, }; - let display_list = ~Cell::new(DisplayList::new::>()); + let display_list = ~Cell::new(DisplayList::>::new()); // TODO: Set options on the builder before building. // TODO: Be smarter about what needs painting. diff --git a/src/components/script/dom/bindings/codegen/CodegenRust.py b/src/components/script/dom/bindings/codegen/CodegenRust.py index 31d2ac1a595..1fa65e67c02 100644 --- a/src/components/script/dom/bindings/codegen/CodegenRust.py +++ b/src/components/script/dom/bindings/codegen/CodegenRust.py @@ -1247,10 +1247,10 @@ for (uint32_t i = 0; i < length; ++i) { dataLoc = "${declName}" #XXXjdm conversionBehavior should be used template = ( - "match JSValConvertible::from_jsval::<%s>(${val}) {\n" + "match JSValConvertible::from_jsval(${val}) {\n" " None => return 0,\n" " Some(v) => %s = v\n" - "}" % (typeName, dataLoc)) + "}" % (dataLoc,)) declType = CGGeneric(typeName) if (defaultValue is not None and # We already handled IDLNullValue, so just deal with the other ones diff --git a/src/components/util/tree.rs b/src/components/util/tree.rs index 3664bae9ac1..d38d4a7f5da 100644 --- a/src/components/util/tree.rs +++ b/src/components/util/tree.rs @@ -9,13 +9,19 @@ // and use its default methods. macro_rules! get( ($node:expr, $fun:ident) => ( - TreeNodeRef::$fun::($node) + { + let val: Option = TreeNodeRef::::$fun($node); + val + } ) ) macro_rules! set( ($node:expr, $fun:ident, $val:expr) => ( - TreeNodeRef::$fun::($node, $val) + { + let val: Option = $val; + TreeNodeRef::::$fun($node, val) + } ) ) @@ -31,7 +37,7 @@ impl> Iterator for ChildIterator { // FIXME: Do we need two clones here? let x = self.current.get_ref().clone(); - self.current = x.with_base(|n| TreeNodeRef::next_sibling::(n)); + self.current = x.with_base(|n| TreeNodeRef::::next_sibling(n)); Some(x.clone()) } } @@ -246,51 +252,51 @@ fn gather>(cur: &Ref, refs: &mut ~[Ref], pub trait TreeNode> { /// Returns the parent of this node. fn parent_node(&self) -> Option { - TreeNodeRef::parent_node::(self) + TreeNodeRef::::parent_node(self) } /// Returns the first child of this node. fn first_child(&self) -> Option { - TreeNodeRef::first_child::(self) + TreeNodeRef::::first_child(self) } /// Returns the last child of this node. fn last_child(&self) -> Option { - TreeNodeRef::last_child::(self) + TreeNodeRef::::last_child(self) } /// Returns the previous sibling of this node. fn prev_sibling(&self) -> Option { - TreeNodeRef::prev_sibling::(self) + TreeNodeRef::::prev_sibling(self) } /// Returns the next sibling of this node. fn next_sibling(&self) -> Option { - TreeNodeRef::next_sibling::(self) + TreeNodeRef::::next_sibling(self) } /// Sets the parent of this node. fn set_parent_node(&mut self, new_parent: Option) { - TreeNodeRef::set_parent_node::(self, new_parent) + TreeNodeRef::::set_parent_node(self, new_parent) } /// Sets the first child of this node. fn set_first_child(&mut self, new_first_child: Option) { - TreeNodeRef::set_first_child::(self, new_first_child) + TreeNodeRef::::set_first_child(self, new_first_child) } /// Sets the last child of this node. fn set_last_child(&mut self, new_last_child: Option) { - TreeNodeRef::set_last_child::(self, new_last_child) + TreeNodeRef::::set_last_child(self, new_last_child) } /// Sets the previous sibling of this node. fn set_prev_sibling(&mut self, new_prev_sibling: Option) { - TreeNodeRef::set_prev_sibling::(self, new_prev_sibling) + TreeNodeRef::::set_prev_sibling(self, new_prev_sibling) } /// Sets the next sibling of this node. fn set_next_sibling(&mut self, new_next_sibling: Option) { - TreeNodeRef::set_next_sibling::(self, new_next_sibling) + TreeNodeRef::::set_next_sibling(self, new_next_sibling) } } diff --git a/src/platform/macos/rust-core-foundation b/src/platform/macos/rust-core-foundation index 9755a007a02..95f2f30981e 160000 --- a/src/platform/macos/rust-core-foundation +++ b/src/platform/macos/rust-core-foundation @@ -1 +1 @@ -Subproject commit 9755a007a0294294740d728ba14de30b45b769e5 +Subproject commit 95f2f30981e12128e1dab0956f11c70386d85bfc diff --git a/src/platform/macos/rust-core-graphics b/src/platform/macos/rust-core-graphics index 4c4662a5d60..adb526a6ca8 160000 --- a/src/platform/macos/rust-core-graphics +++ b/src/platform/macos/rust-core-graphics @@ -1 +1 @@ -Subproject commit 4c4662a5d6077b547466d33c9a00cb33df9f6f26 +Subproject commit adb526a6ca8deee37152ef3ba1197894286e2204 diff --git a/src/platform/macos/rust-core-text b/src/platform/macos/rust-core-text index 36b060d0aef..129e99ff088 160000 --- a/src/platform/macos/rust-core-text +++ b/src/platform/macos/rust-core-text @@ -1 +1 @@ -Subproject commit 36b060d0aef4b3d3f644ef221a0aaca4cd31bcdb +Subproject commit 129e99ff088fad6ea8f3187680c15a0a3e2cc403 diff --git a/src/platform/macos/rust-io-surface b/src/platform/macos/rust-io-surface index e775ce635a0..d685aad6f6a 160000 --- a/src/platform/macos/rust-io-surface +++ b/src/platform/macos/rust-io-surface @@ -1 +1 @@ -Subproject commit e775ce635a063bf1d5d6b5b0c5339cbb818116ab +Subproject commit d685aad6f6ab3559c8de5ca76520b8f1e0e21b64 diff --git a/src/support/netsurfcss/rust-netsurfcss b/src/support/netsurfcss/rust-netsurfcss index 0793c920f33..f69e26f4d97 160000 --- a/src/support/netsurfcss/rust-netsurfcss +++ b/src/support/netsurfcss/rust-netsurfcss @@ -1 +1 @@ -Subproject commit 0793c920f33c5928323358f7aba7da3253019c60 +Subproject commit f69e26f4d97316063b6c20f0c71d7568d8d42a76 diff --git a/src/support/spidermonkey/rust-mozjs b/src/support/spidermonkey/rust-mozjs index d951d00382c..b7121da7fcb 160000 --- a/src/support/spidermonkey/rust-mozjs +++ b/src/support/spidermonkey/rust-mozjs @@ -1 +1 @@ -Subproject commit d951d00382c7ad95d64b87f876188df7f0254f00 +Subproject commit b7121da7fcb5eba84b563118db49a43279c88ee9