Skip to content

Commit 40a52c0

Browse files
committed
Add #[deny(deprecated_owned_vector)] to several modules.
1 parent d50f5bd commit 40a52c0

File tree

7 files changed

+13
-6
lines changed

7 files changed

+13
-6
lines changed

src/libflate/lib.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Simple compression
2222
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
2323
html_root_url = "http://static.rust-lang.org/doc/master")];
2424
#[feature(phase)];
25+
#[deny(deprecated_owned_vector)];
2526

2627
#[cfg(test)] #[phase(syntax, link)] extern crate log;
2728

@@ -100,17 +101,18 @@ mod tests {
100101
use self::rand::Rng;
101102

102103
#[test]
104+
#[allow(deprecated_owned_vector)]
103105
fn test_flate_round_trip() {
104106
let mut r = rand::task_rng();
105-
let mut words = ~[];
107+
let mut words = vec!();
106108
for _ in range(0, 20) {
107109
let range = r.gen_range(1u, 10);
108110
words.push(r.gen_vec::<u8>(range));
109111
}
110112
for _ in range(0, 20) {
111113
let mut input = ~[];
112114
for _ in range(0, 2000) {
113-
input.push_all(r.choose(words));
115+
input.push_all(r.choose(words.as_slice()));
114116
}
115117
debug!("de/inflate of {} bytes of random word-sequences",
116118
input.len());
@@ -125,8 +127,8 @@ mod tests {
125127

126128
#[test]
127129
fn test_zlib_flate() {
128-
let bytes = ~[1, 2, 3, 4, 5];
129-
let deflated = deflate_bytes(bytes);
130+
let bytes = vec!(1, 2, 3, 4, 5);
131+
let deflated = deflate_bytes(bytes.as_slice());
130132
let inflated = inflate_bytes(deflated.as_slice());
131133
assert_eq!(inflated.as_slice(), bytes.as_slice());
132134
}

src/libfourcc/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ fn main() {
4747
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
4848
html_root_url = "http://static.rust-lang.org/doc/master")];
4949

50+
#[deny(deprecated_owned_vector)];
5051
#[feature(macro_registrar, managed_boxes)];
5152

5253
extern crate syntax;

src/libhexfloat/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ fn main() {
4444
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
4545
html_root_url = "http://static.rust-lang.org/doc/master")];
4646

47+
#[deny(deprecated_owned_vector)];
4748
#[feature(macro_registrar, managed_boxes)];
4849

4950
extern crate syntax;

src/liblog/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ if logging is disabled, none of the components of the log will be executed.
114114
html_root_url = "http://static.rust-lang.org/doc/master")];
115115

116116
#[feature(macro_rules)];
117-
#[deny(missing_doc)];
117+
#[deny(missing_doc, deprecated_owned_vector)];
118118

119119
extern crate sync;
120120

src/libnum/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
1919
html_root_url = "http://static.rust-lang.org/doc/master")];
2020

21+
#[deny(deprecated_owned_vector)];
22+
2123
extern crate rand;
2224

2325
pub mod bigint;

src/libsemver/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
3636
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
3737
html_root_url = "http://static.rust-lang.org/doc/master")];
38+
#[deny(deprecated_owned_vector)];
3839

3940
use std::char;
4041
use std::cmp;

src/libtime/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
1717
html_root_url = "http://static.rust-lang.org/doc/master")];
1818
#[feature(phase)];
19-
#[allow(deprecated_owned_vector)]; // NOTE: remove after stage0
19+
#[deny(deprecated_owned_vector)];
2020

2121
#[cfg(test)] #[phase(syntax, link)] extern crate log;
2222
extern crate serialize;

0 commit comments

Comments
 (0)