diff --git a/components/compositing/pipeline.rs b/components/compositing/pipeline.rs index 618fe260806..d1acc51b641 100644 --- a/components/compositing/pipeline.rs +++ b/components/compositing/pipeline.rs @@ -123,7 +123,7 @@ impl Pipeline { new_pipeline_id: id, subpage_id: subpage_id, load_data: load_data.clone(), - paint_chan: box() (paint_chan.clone()) as Box, + paint_chan: box paint_chan.clone() as Box, failure: failure, pipeline_port: mem::replace(&mut pipeline_port, None).unwrap(), layout_shutdown_chan: layout_shutdown_chan.clone(), diff --git a/components/plugins/lints/str_to_string.rs b/components/plugins/lints/str_to_string.rs index e58ff4e93ac..03a6b4f3a3e 100644 --- a/components/plugins/lints/str_to_string.rs +++ b/components/plugins/lints/str_to_string.rs @@ -22,7 +22,7 @@ impl LintPass for StrToStringPass { fn check_expr(&mut self, cx: &Context, expr: &ast::Expr) { match expr.node { ast::ExprMethodCall(ref method, _, ref args) - if method.node.as_str() == "to_string" + if method.node.name.as_str() == "to_string" && is_str(cx, &*args[0]) => { cx.span_lint(STR_TO_STRING, expr.span, "str.to_owned() is more efficient than str.to_string(), please use it instead"); diff --git a/components/plugins/lints/unrooted_must_root.rs b/components/plugins/lints/unrooted_must_root.rs index d51fe19871e..3d34c28db46 100644 --- a/components/plugins/lints/unrooted_must_root.rs +++ b/components/plugins/lints/unrooted_must_root.rs @@ -121,9 +121,9 @@ impl LintPass for UnrootedPass { block: &ast::Block, _span: codemap::Span, id: ast::NodeId) { match kind { visit::FkItemFn(i, _, _, _, _, _) | - visit::FkMethod(i, _, _) if i.as_str() == "new" - || i.as_str() == "new_inherited" - || i.as_str() == "new_initialized" => { + visit::FkMethod(i, _, _) if i.name.as_str() == "new" + || i.name.as_str() == "new_inherited" + || i.name.as_str() == "new_initialized" => { self.in_new_function = true; return; }, diff --git a/components/plugins/utils.rs b/components/plugins/utils.rs index 9cd843ae5a7..573eca63f6e 100644 --- a/components/plugins/utils.rs +++ b/components/plugins/utils.rs @@ -22,7 +22,7 @@ pub fn match_ty_unwrap<'a>(ty: &'a Ty, segments: &[&str]) -> Option<&'a [P]> // I could muck around with the maps and find the full path // however the more efficient way is to simply reverse the iterators and zip them // which will compare them in reverse until one of them runs out of segments - if seg.iter().rev().zip(segments.iter().rev()).all(|(a,b)| a.identifier.as_str() == *b) { + if seg.iter().rev().zip(segments.iter().rev()).all(|(a,b)| a.identifier.name.as_str() == *b) { match seg.last() { Some(&PathSegment {parameters: AngleBracketedParameters(ref a), ..}) => { Some(&a.types) diff --git a/components/profile/lib.rs b/components/profile/lib.rs index f736d408ff1..1577df154f2 100644 --- a/components/profile/lib.rs +++ b/components/profile/lib.rs @@ -4,8 +4,7 @@ #![feature(box_syntax)] #![feature(iter_arith)] -#![cfg_attr(target_os="linux", feature(page_size))] -#![feature(slice_extras)] +#![feature(slice_splits)] #[macro_use] extern crate log; diff --git a/components/profile/mem.rs b/components/profile/mem.rs index ba0d9e168e6..b04ced9905a 100644 --- a/components/profile/mem.rs +++ b/components/profile/mem.rs @@ -313,14 +313,15 @@ impl ReportsForest { // Insert the path and size into the forest, adding any trees and nodes as necessary. fn insert(&mut self, path: &[String], size: usize) { + let (head, tail) = path.split_first().unwrap(); // Get the right tree, creating it if necessary. - if !self.trees.contains_key(&path[0]) { - self.trees.insert(path[0].clone(), ReportsTree::new(path[0].clone())); + if !self.trees.contains_key(head) { + self.trees.insert(head.clone(), ReportsTree::new(head.clone())); } - let t = self.trees.get_mut(&path[0]).unwrap(); + let t = self.trees.get_mut(head).unwrap(); - // Use tail() because the 0th path segment was used to find the right tree in the forest. - t.insert(path.tail(), size); + // Use tail because the 0th path segment was used to find the right tree in the forest. + t.insert(tail, size); } fn print(&mut self) { @@ -499,6 +500,13 @@ mod system_reporter { ($e:expr) => (match $e { Some(e) => e, None => return None }) ); + #[cfg(target_os="linux")] + fn page_size() -> usize { + unsafe { + ::libc::sysconf(::libc::_SC_PAGESIZE) as usize + } + } + #[cfg(target_os="linux")] fn get_proc_self_statm_field(field: usize) -> Option { use std::fs::File; @@ -509,7 +517,7 @@ mod system_reporter { option_try!(f.read_to_string(&mut contents).ok()); let s = option_try!(contents.split_whitespace().nth(field)); let npages = option_try!(s.parse::().ok()); - Some(npages * ::std::env::page_size()) + Some(npages * page_size()) } #[cfg(target_os="linux")] diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml index 6db3092f3b5..27718e7fc30 100644 --- a/components/script/Cargo.toml +++ b/components/script/Cargo.toml @@ -80,7 +80,7 @@ websocket = "0.12" uuid = "0.1.16" smallvec = "0.1" html5ever = "0.2" -string_cache = "0.1" +string_cache = { version = "0.1.9", features = ["unstable"] } string_cache_plugin = "0.1" euclid = "0.1" tendril = "0.1.1" diff --git a/components/script/dom/bindings/utils.rs b/components/script/dom/bindings/utils.rs index 3a64b709ba3..bacb6bc05ae 100644 --- a/components/script/dom/bindings/utils.rs +++ b/components/script/dom/bindings/utils.rs @@ -381,8 +381,8 @@ pub type ProtoOrIfaceArray = [*mut JSObject; PrototypeList::ID::Count as usize]; /// Construct and cache the ProtoOrIfaceArray for the given global. /// Fails if the argument is not a DOM global. pub fn initialize_global(global: *mut JSObject) { - let proto_array: Box = box () - ([0 as *mut JSObject; PrototypeList::ID::Count as usize]); + let proto_array: Box = + box [0 as *mut JSObject; PrototypeList::ID::Count as usize]; unsafe { assert!(((*JS_GetClass(global)).flags & JSCLASS_DOM_GLOBAL) != 0); let box_ = Box::into_raw(proto_array); diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 082b0dafe86..9df842dddfc 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -1430,7 +1430,7 @@ impl<'a> DocumentMethods for &'a Document { Some(ref title) => { // Steps 3-4. let value = Node::collect_text_contents(title.r().children()); - split_html_space_chars(&value).collect::>().connect(" ") + split_html_space_chars(&value).collect::>().join(" ") }, } } diff --git a/components/script/dom/htmlbuttonelement.rs b/components/script/dom/htmlbuttonelement.rs index 1cbf331e098..927ac9688c7 100644 --- a/components/script/dom/htmlbuttonelement.rs +++ b/components/script/dom/htmlbuttonelement.rs @@ -22,7 +22,7 @@ use dom::node::{DisabledStateHelpers, Node, NodeHelpers, NodeTypeId, document_fr use dom::validitystate::ValidityState; use dom::virtualmethods::VirtualMethods; -use std::ascii::OwnedAsciiExt; +use std::ascii::AsciiExt; use std::borrow::ToOwned; use util::str::DOMString; use std::cell::Cell; @@ -87,7 +87,8 @@ impl<'a> HTMLButtonElementMethods for &'a HTMLButtonElement { // https://html.spec.whatwg.org/multipage/#dom-button-type fn Type(self) -> DOMString { let elem = ElementCast::from_ref(self); - let ty = elem.get_string_attribute(&atom!("type")).into_ascii_lowercase(); + let mut ty = elem.get_string_attribute(&atom!("type")); + ty.make_ascii_lowercase(); // https://html.spec.whatwg.org/multipage/#attr-button-type match &*ty { "reset" | "button" | "menu" => ty, diff --git a/components/script/dom/htmlformelement.rs b/components/script/dom/htmlformelement.rs index bfa5792327a..e0a948bbedf 100644 --- a/components/script/dom/htmlformelement.rs +++ b/components/script/dom/htmlformelement.rs @@ -35,7 +35,6 @@ use hyper::mime; use msg::constellation_msg::LoadData; use util::str::DOMString; use script_task::{ScriptChan, ScriptMsg}; -use std::ascii::OwnedAsciiExt; use url::UrlParser; use url::form_urlencoded::serialize; use string_cache::Atom; diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs index cc6bd5e668c..2e883feae1d 100644 --- a/components/script/dom/htmlinputelement.rs +++ b/components/script/dom/htmlinputelement.rs @@ -38,7 +38,6 @@ use msg::constellation_msg::ConstellationChan; use util::str::DOMString; use string_cache::Atom; -use std::ascii::OwnedAsciiExt; use std::borrow::ToOwned; use std::cell::Cell; diff --git a/components/script/dom/htmloptionelement.rs b/components/script/dom/htmloptionelement.rs index b675f30ac03..28b7f0651ae 100644 --- a/components/script/dom/htmloptionelement.rs +++ b/components/script/dom/htmloptionelement.rs @@ -88,7 +88,7 @@ impl<'a> HTMLOptionElementMethods for &'a HTMLOptionElement { let mut content = String::new(); collect_text(&node, &mut content); let v: Vec<&str> = split_html_space_chars(&content).collect(); - v.connect(" ") + v.join(" ") } // https://www.whatwg.org/html/#dom-option-text diff --git a/components/script/dom/macros.rs b/components/script/dom/macros.rs index 457989af969..6b19d3f99c0 100644 --- a/components/script/dom/macros.rs +++ b/components/script/dom/macros.rs @@ -104,9 +104,10 @@ macro_rules! make_enumerated_getter( use dom::bindings::codegen::InheritTypes::ElementCast; use string_cache::Atom; use std::borrow::ToOwned; + use std::ascii::AsciiExt; let element = ElementCast::from_ref(self); - let val = element.get_string_attribute(&Atom::from_slice($htmlname)) - .into_ascii_lowercase(); + let mut val = element.get_string_attribute(&Atom::from_slice($htmlname)); + val.make_ascii_lowercase(); // https://html.spec.whatwg.org/multipage/#attr-fs-method match &*val { $($choices)|+ => val, diff --git a/components/script/lib.rs b/components/script/lib.rs index d446bb52cc1..3e38d1c88fc 100644 --- a/components/script/lib.rs +++ b/components/script/lib.rs @@ -4,6 +4,7 @@ #![feature(append)] #![feature(arc_unique)] +#![feature(ascii)] #![feature(as_slice)] #![feature(as_unsafe_cell)] #![feature(borrow_state)] @@ -17,7 +18,6 @@ #![feature(hashmap_hasher)] #![feature(mpsc_select)] #![feature(nonzero)] -#![feature(owned_ascii_ext)] #![feature(plugin)] #![feature(ref_slice)] #![feature(rc_unique)] diff --git a/components/script/script_task.rs b/components/script/script_task.rs index 369622c0d6f..7deed84430d 100644 --- a/components/script/script_task.rs +++ b/components/script/script_task.rs @@ -1099,7 +1099,7 @@ impl ScriptTask { for it_page in self.root_page().iter() { urls.push(it_page.document().url().serialize()); } - let path_seg = format!("url({})", urls.connect(", ")); + let path_seg = format!("url({})", urls.join(", ")); let reports = ScriptTask::get_reports(self.get_cx(), path_seg); reports_chan.send(reports); } diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index b5ae7490a37..3fe52f4fce4 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -49,7 +49,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "aster" -version = "0.3.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -243,6 +243,14 @@ name = "debug-builders" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "debug_unreachable" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unreachable 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "devtools" version = "0.0.1" @@ -465,7 +473,7 @@ dependencies = [ "serde_macros 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "skia 0.0.20130412 (git+https://github.com/servo/skia)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", "time 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", @@ -597,8 +605,8 @@ dependencies = [ "mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "phf 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "phf_macros 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "tendril 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -744,8 +752,8 @@ dependencies = [ "serde 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", "unicode-bidi 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1004,6 +1012,15 @@ dependencies = [ "phf_shared 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "phf_codegen" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "phf_generator 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_shared 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "phf_generator" version = "0.7.3" @@ -1099,7 +1116,7 @@ name = "quasi_codegen" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aster 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "aster 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1181,8 +1198,8 @@ dependencies = [ "selectors 0.1.0 (git+https://github.com/servo/rust-selectors)", "serde 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", "tendril 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1229,8 +1246,8 @@ dependencies = [ "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "quicksort 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1246,7 +1263,7 @@ name = "serde_codegen" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aster 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "aster 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "quasi 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "quasi_macros 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1309,32 +1326,34 @@ dependencies = [ [[package]] name = "string_cache" -version = "0.1.6" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "phf 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_macros 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_shared 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_shared 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "string_cache_plugin" -version = "0.1.2" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_shared 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_shared 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "string_cache_shared" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "debug_unreachable 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "phf 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_codegen 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "style" @@ -1355,8 +1374,8 @@ dependencies = [ "serde 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", ] @@ -1368,8 +1387,8 @@ dependencies = [ "cssparser 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.1.0 (git+https://github.com/servo/rust-selectors)", - "string_cache 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", "url 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", @@ -1437,6 +1456,14 @@ dependencies = [ "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "unreachable" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "void 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "url" version = "0.2.36" @@ -1498,6 +1525,11 @@ dependencies = [ "rustc-serialize 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "void" +version = "0.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "webdriver" version = "0.2.0" diff --git a/components/util/lib.rs b/components/util/lib.rs index 4e7759795c9..b108c516acc 100644 --- a/components/util/lib.rs +++ b/components/util/lib.rs @@ -15,7 +15,7 @@ #![feature(path_ext)] #![feature(plugin)] #![feature(rustc_private)] -#![feature(slice_extras)] +#![feature(slice_splits)] #![feature(step_by)] #![feature(step_trait)] #![feature(zero_one)] diff --git a/components/util/opts.rs b/components/util/opts.rs index 6787c9e7492..c8f65c97e54 100644 --- a/components/util/opts.rs +++ b/components/util/opts.rs @@ -267,8 +267,7 @@ pub fn default_opts() -> Opts { } pub fn from_cmdline_args(args: &[String]) { - let app_name = args[0].to_string(); - let args = args.tail(); + let (app_name, args) = args.split_first().unwrap(); let opts = vec!( getopts::optflag("c", "cpu", "CPU painting (default)"), @@ -305,7 +304,7 @@ pub fn from_cmdline_args(args: &[String]) { }; if opt_match.opt_present("h") || opt_match.opt_present("help") { - print_usage(&app_name, &opts); + print_usage(app_name, &opts); process::exit(0); }; @@ -318,11 +317,11 @@ pub fn from_cmdline_args(args: &[String]) { debug_options.insert(split.clone()); } if debug_options.contains(&"help") { - print_debug_usage(&app_name) + print_debug_usage(app_name) } let url = if opt_match.free.is_empty() { - print_usage(&app_name, &opts); + print_usage(app_name, &opts); args_fail("servo asks that you provide a URL") } else { let ref url = opt_match.free[0]; diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock index 3551ce8bc9b..a4d6e19efc9 100644 --- a/ports/cef/Cargo.lock +++ b/ports/cef/Cargo.lock @@ -48,7 +48,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "aster" -version = "0.3.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -242,6 +242,14 @@ name = "debug-builders" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "debug_unreachable" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unreachable 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "devtools" version = "0.0.1" @@ -464,7 +472,7 @@ dependencies = [ "serde_macros 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "skia 0.0.20130412 (git+https://github.com/servo/skia)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", "time 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", @@ -589,8 +597,8 @@ dependencies = [ "mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "phf 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "phf_macros 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "tendril 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -736,8 +744,8 @@ dependencies = [ "serde 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", "unicode-bidi 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", @@ -983,6 +991,15 @@ dependencies = [ "phf_shared 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "phf_codegen" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "phf_generator 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_shared 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "phf_generator" version = "0.7.3" @@ -1078,7 +1095,7 @@ name = "quasi_codegen" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aster 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "aster 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1160,8 +1177,8 @@ dependencies = [ "selectors 0.1.0 (git+https://github.com/servo/rust-selectors)", "serde 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", "tendril 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1200,8 +1217,8 @@ dependencies = [ "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "quicksort 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1217,7 +1234,7 @@ name = "serde_codegen" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aster 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "aster 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "quasi 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "quasi_macros 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1306,32 +1323,34 @@ dependencies = [ [[package]] name = "string_cache" -version = "0.1.6" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "phf 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_macros 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_shared 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_shared 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "string_cache_plugin" -version = "0.1.2" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_shared 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_shared 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "string_cache_shared" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "debug_unreachable 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "phf 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_codegen 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "style" @@ -1352,8 +1371,8 @@ dependencies = [ "serde 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", ] @@ -1420,6 +1439,14 @@ dependencies = [ "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "unreachable" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "void 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "url" version = "0.2.36" @@ -1471,6 +1498,11 @@ dependencies = [ "rustc-serialize 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "void" +version = "0.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "webdriver" version = "0.2.0" diff --git a/ports/gonk/Cargo.lock b/ports/gonk/Cargo.lock index b12866d9cd5..fa217e9e27f 100644 --- a/ports/gonk/Cargo.lock +++ b/ports/gonk/Cargo.lock @@ -35,7 +35,7 @@ dependencies = [ [[package]] name = "aster" -version = "0.3.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -219,6 +219,14 @@ name = "debug-builders" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "debug_unreachable" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unreachable 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "devtools" version = "0.0.1" @@ -443,7 +451,7 @@ dependencies = [ "serde_macros 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "skia 0.0.20130412 (git+https://github.com/servo/skia)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", "time 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", @@ -523,8 +531,8 @@ dependencies = [ "mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "phf 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "phf_macros 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "tendril 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -670,8 +678,8 @@ dependencies = [ "serde 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", "unicode-bidi 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", @@ -891,6 +899,15 @@ dependencies = [ "phf_shared 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "phf_codegen" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "phf_generator 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_shared 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "phf_generator" version = "0.7.3" @@ -986,7 +1003,7 @@ name = "quasi_codegen" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aster 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "aster 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1068,8 +1085,8 @@ dependencies = [ "selectors 0.1.0 (git+https://github.com/servo/rust-selectors)", "serde 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", "tendril 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1108,8 +1125,8 @@ dependencies = [ "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "quicksort 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1125,7 +1142,7 @@ name = "serde_codegen" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aster 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "aster 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "quasi 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "quasi_macros 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1204,32 +1221,34 @@ dependencies = [ [[package]] name = "string_cache" -version = "0.1.6" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "phf 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_macros 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_shared 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_shared 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "string_cache_plugin" -version = "0.1.2" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_shared 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_shared 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "string_cache_shared" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "debug_unreachable 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "phf 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_codegen 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "style" @@ -1250,8 +1269,8 @@ dependencies = [ "serde 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", ] @@ -1318,6 +1337,14 @@ dependencies = [ "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "unreachable" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "void 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "url" version = "0.2.36" @@ -1360,6 +1387,11 @@ dependencies = [ "rustc-serialize 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "void" +version = "0.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "webdriver" version = "0.2.0" diff --git a/rust-snapshot-hash b/rust-snapshot-hash index c4507561da4..8f8341f6a47 100644 --- a/rust-snapshot-hash +++ b/rust-snapshot-hash @@ -1 +1 @@ -fddfd089b75379f1d25f81541572d69a93f95c4f/rustc-1.3.0-dev +87055a68c3194db212456f99ece080728a5fc2f8/rustc-1.3.0-dev diff --git a/tests/unit/util/mem.rs b/tests/unit/util/mem.rs index ff25ded0b31..c281d54c0c3 100644 --- a/tests/unit/util/mem.rs +++ b/tests/unit/util/mem.rs @@ -64,9 +64,12 @@ fn test_heap_size() { assert_eq!(x.heap_size_of_children(), 8); // An ascii string with 16 chars is 16 bytes in UTF-8. + assert_eq!(String::from("0123456789abcdef").heap_size_of_children(), 16); + + // … but RawVec::reserve gives twice the requested capacity. let mut x = String::new(); x.push_str("0123456789abcdef"); - assert_eq!(x.heap_size_of_children(), 16); + assert_eq!(x.heap_size_of_children(), 32); // Not on the heap. let x: Option = None;