Add #[deny(deprecated_owned_vector)] to several modules.

This commit is contained in:
Huon Wilson 2014-03-21 23:34:12 +11:00
parent d50f5bd722
commit 40a52c0f0a
7 changed files with 13 additions and 6 deletions

View File

@ -22,6 +22,7 @@ Simple compression
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;
@ -100,9 +101,10 @@ mod tests {
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));
@ -110,7 +112,7 @@ mod tests {
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());
@ -125,8 +127,8 @@ mod tests {
#[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());
}

View File

@ -47,6 +47,7 @@ fn main() {
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;

View File

@ -44,6 +44,7 @@ fn main() {
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;

View File

@ -114,7 +114,7 @@ if logging is disabled, none of the components of the log will be executed.
html_root_url = "http://static.rust-lang.org/doc/master")];
#[feature(macro_rules)];
#[deny(missing_doc)];
#[deny(missing_doc, deprecated_owned_vector)];
extern crate sync;

View File

@ -18,6 +18,8 @@
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://static.rust-lang.org/doc/master")];
#[deny(deprecated_owned_vector)];
extern crate rand;
pub mod bigint;

View File

@ -35,6 +35,7 @@
#[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;

View File

@ -16,7 +16,7 @@
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;