html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://static.rust-lang.org/doc/master")];
#[feature(phase)];
+#[deny(deprecated_owned_vector)];
#[cfg(test)] #[phase(syntax, link)] extern crate log;
use self::rand::Rng;
#[test]
+ #[allow(deprecated_owned_vector)]
fn test_flate_round_trip() {
let mut r = rand::task_rng();
- let mut words = ~[];
+ let mut words = vec!();
for _ in range(0, 20) {
let range = r.gen_range(1u, 10);
words.push(r.gen_vec::<u8>(range));
for _ in range(0, 20) {
let mut input = ~[];
for _ in range(0, 2000) {
- input.push_all(r.choose(words));
+ input.push_all(r.choose(words.as_slice()));
}
debug!("de/inflate of {} bytes of random word-sequences",
input.len());
#[test]
fn test_zlib_flate() {
- let bytes = ~[1, 2, 3, 4, 5];
- let deflated = deflate_bytes(bytes);
+ let bytes = vec!(1, 2, 3, 4, 5);
+ let deflated = deflate_bytes(bytes.as_slice());
let inflated = inflate_bytes(deflated.as_slice());
assert_eq!(inflated.as_slice(), bytes.as_slice());
}
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://static.rust-lang.org/doc/master")];
+#[deny(deprecated_owned_vector)];
#[feature(macro_registrar, managed_boxes)];
extern crate syntax;
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://static.rust-lang.org/doc/master")];
+#[deny(deprecated_owned_vector)];
#[feature(macro_registrar, managed_boxes)];
extern crate syntax;
#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://static.rust-lang.org/doc/master")];
+#[deny(deprecated_owned_vector)];
use std::char;
use std::cmp;
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://static.rust-lang.org/doc/master")];
#[feature(phase)];
-#[allow(deprecated_owned_vector)]; // NOTE: remove after stage0
+#[deny(deprecated_owned_vector)];
#[cfg(test)] #[phase(syntax, link)] extern crate log;
extern crate serialize;