Skip to content

Improve the Vec experience #13020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/compiletest/compiletest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

#[allow(non_camel_case_types)];
#[deny(warnings)];
#[allow(deprecated_owned_vector)];

extern crate test;
extern crate getopts;
Expand Down
1 change: 0 additions & 1 deletion src/libarena/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
html_root_url = "http://static.rust-lang.org/doc/master")];
#[allow(missing_doc)];
#[feature(managed_boxes)];
#[allow(deprecated_owned_vector)];

extern crate collections;

Expand Down
1 change: 0 additions & 1 deletion src/libcollections/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
// NOTE remove the following two attributes after the next snapshot.
#[allow(unrecognized_lint)];
#[allow(default_type_param_usage)];
#[allow(deprecated_owned_vector)];

extern crate rand;

Expand Down
1 change: 0 additions & 1 deletion src/libflate/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ pub fn inflate_bytes_zlib(bytes: &[u8]) -> CVec<u8> {

#[cfg(test)]
mod tests {
#[allow(deprecated_owned_vector)];
extern crate rand;

use super::{inflate_bytes, deflate_bytes};
Expand Down
1 change: 0 additions & 1 deletion src/libgetopts/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://static.rust-lang.org/doc/master")];
#[deny(missing_doc)];
#[allow(deprecated_owned_vector)];

#[feature(globs, phase)];

Expand Down
1 change: 0 additions & 1 deletion src/libglob/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#[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")];
#[allow(deprecated_owned_vector)];

use std::cell::Cell;
use std::{cmp, os, path};
Expand Down
1 change: 0 additions & 1 deletion src/libgreen/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@
// NB this does *not* include globs, please keep it that way.
#[feature(macro_rules, phase)];
#[allow(visible_private_types)];
#[allow(deprecated_owned_vector)];

#[cfg(test)] #[phase(syntax, link)] extern crate log;
extern crate rand;
Expand Down
1 change: 0 additions & 1 deletion src/liblog/directive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
// except according to those terms.

use std::cmp;
use std::vec::Vec;

#[deriving(Show, Clone)]
pub struct LogDirective {
Expand Down
1 change: 0 additions & 1 deletion src/liblog/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ use std::local_data;
use std::os;
use std::rt;
use std::slice;
use std::vec::Vec;

use sync::one::{Once, ONCE_INIT};

Expand Down
1 change: 0 additions & 1 deletion src/libnative/io/file_unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ use std::libc;
use std::mem;
use std::rt::rtio;
use std::slice;
use std::vec::Vec;

use io::{IoResult, retry, keep_going};

Expand Down
1 change: 0 additions & 1 deletion src/libnative/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
html_root_url = "http://static.rust-lang.org/doc/master")];
#[deny(unused_result, unused_must_use)];
#[allow(non_camel_case_types)];
#[allow(deprecated_owned_vector)];

// NB this crate explicitly does *not* allow glob imports, please seriously
// consider whether they're needed before adding that feature here (the
Expand Down
3 changes: 0 additions & 3 deletions src/libnum/bigint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ use std::str;
use std::uint;
use std::{i64, u64};
use std::vec;
use std::vec::Vec;

/**
A `BigDigit` is a `BigUint`'s composing element.
Expand Down Expand Up @@ -1461,7 +1460,6 @@ mod biguint_tests {
use std::num::CheckedDiv;
use rand::{task_rng};
use std::u64;
use std::vec::Vec;

#[test]
fn test_from_slice() {
Expand Down Expand Up @@ -2195,7 +2193,6 @@ mod bigint_tests {
use std::num::{ToPrimitive, FromPrimitive};
use rand::{task_rng};
use std::u64;
use std::vec::Vec;

#[test]
fn test_from_biguint() {
Expand Down
1 change: 0 additions & 1 deletion src/libnum/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#[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")];
#[allow(deprecated_owned_vector)];

extern crate rand;

Expand Down
1 change: 0 additions & 1 deletion src/libnum/rational.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use std::cmp;
use std::fmt;
use std::from_str::FromStr;
use std::num::{Zero,One,ToStrRadix,FromStrRadix,Round};
use std::vec::Vec;
use bigint::{BigInt, BigUint, Sign, Plus, Minus};

/// Represents the ratio between 2 numbers.
Expand Down
1 change: 0 additions & 1 deletion src/librand/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ println!("{:?}", tuple_ptr)
html_root_url = "http://static.rust-lang.org/doc/master")];

#[feature(macro_rules, managed_boxes, phase)];
#[allow(deprecated_owned_vector)];

#[cfg(test)]
#[phase(syntax, link)] extern crate log;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/back/archive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use metadata::filesearch;
use lib::llvm::{ArchiveRef, llvm};

use std::cast;
use std::vec::Vec;
use std::io;
use std::io::{fs, TempDir};
use std::libc;
Expand Down
2 changes: 0 additions & 2 deletions src/librustc/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ use std::ptr;
use std::str;
use std::io;
use std::io::{fs, TempDir, Process};
use std::vec::Vec;
use flate;
use serialize::hex::ToHex;
use syntax::abi;
Expand Down Expand Up @@ -105,7 +104,6 @@ pub mod write {
use std::io::Process;
use std::libc::{c_uint, c_int};
use std::str;
use std::vec::Vec;

// On android, we by default compile for armv7 processors. This enables
// things like double word CAS instructions (rather than emulating them)
Expand Down
1 change: 0 additions & 1 deletion src/librustc/back/mips.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use back::target_strs;
use driver::session::sess_os_to_meta_os;
use metadata::loader::meta_section_name;
use std::vec::Vec;
use syntax::abi;

pub fn get_target_strs(target_triple: ~str, target_os: abi::Os) -> target_strs::t {
Expand Down
1 change: 0 additions & 1 deletion src/librustc/back/rpath.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use metadata::filesearch;

use collections::HashSet;
use std::{os, slice};
use std::vec::Vec;
use syntax::abi;

fn not_win32(os: abi::Os) -> bool {
Expand Down
2 changes: 0 additions & 2 deletions src/librustc/back/target_strs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

#[allow(non_camel_case_types)];

use std::vec::Vec;

pub struct t {
module_asm: ~str,
meta_sect_name: ~str,
Expand Down
1 change: 0 additions & 1 deletion src/librustc/driver/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ use std::io::fs;
use std::io::MemReader;
use std::mem::drop;
use std::os;
use std::vec::Vec;
use std::vec;
use getopts::{optopt, optmulti, optflag, optflagopt};
use getopts;
Expand Down
3 changes: 1 addition & 2 deletions src/librustc/driver/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ use syntax::{abi, ast, codemap};
use syntax;

use std::cell::{Cell, RefCell};
use std::vec::Vec;
use collections::HashSet;

pub struct Config {
Expand Down Expand Up @@ -407,7 +406,7 @@ macro_rules! cgoptions(
}
}

fn parse_list(slot: &mut ::std::vec::Vec<~str>, v: Option<&str>)
fn parse_list(slot: &mut Vec<~str>, v: Option<&str>)
-> bool {
match v {
Some(s) => {
Expand Down
1 change: 0 additions & 1 deletion src/librustc/front/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use std::vec::Vec;
use syntax::fold::Folder;
use syntax::{ast, fold, attr};
use syntax::codemap;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/front/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ use syntax::parse::token;
use driver::session::Session;

use std::cell::Cell;
use std::vec::Vec;

/// This is a list of all known features since the beginning of time. This list
/// can never shrink, it may only be expanded (in order to prevent old programs
Expand Down
1 change: 0 additions & 1 deletion src/librustc/front/std_inject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

use driver::session::Session;

use std::vec::Vec;
use std::vec;
use syntax::ast;
use syntax::attr;
Expand Down
2 changes: 0 additions & 2 deletions src/librustc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ This API is completely unstable and subject to change.
html_root_url = "http://static.rust-lang.org/doc/master")];

#[allow(deprecated)];
#[allow(deprecated_owned_vector)];
#[feature(macro_rules, globs, struct_variant, managed_boxes)];
#[feature(quote, default_type_params, phase)];

Expand All @@ -55,7 +54,6 @@ use std::io;
use std::os;
use std::str;
use std::task;
use std::vec::Vec;
use std::vec;
use syntax::ast;
use syntax::diagnostic::Emitter;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/metadata/creader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ use metadata::loader;
use metadata::loader::Os;

use std::cell::RefCell;
use std::vec::Vec;
use collections::HashMap;
use syntax::ast;
use syntax::abi;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/metadata/csearch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use middle::typeck;

use reader = serialize::ebml::reader;
use std::rc::Rc;
use std::vec::Vec;
use std::vec;
use syntax::ast;
use syntax::ast_map;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/metadata/cstore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use metadata::decoder;
use metadata::loader;

use std::cell::RefCell;
use std::vec::Vec;
use std::c_vec::CVec;
use collections::HashMap;
use syntax::ast;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/metadata/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ use std::io;
use std::io::extensions::u64_from_be_bytes;
use std::option;
use std::rc::Rc;
use std::vec::Vec;
use serialize::ebml::reader;
use serialize::ebml;
use serialize::Decodable;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/metadata/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ use std::hash;
use std::hash::Hash;
use std::io::MemWriter;
use std::str;
use std::vec::Vec;
use collections::HashMap;
use syntax::abi::AbiSet;
use syntax::ast::*;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/metadata/filesearch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use std::cell::RefCell;
use std::os;
use std::io::fs;
use std::vec::Vec;
use collections::HashSet;

pub enum FileMatch { FileMatches, FileDoesntMatch }
Expand Down
1 change: 0 additions & 1 deletion src/librustc/metadata/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ use std::io;
use std::os::consts::{macos, freebsd, linux, android, win32};
use std::str;
use std::slice;
use std::vec::Vec;

use collections::{HashMap, HashSet};
use flate;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/metadata/tydecode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use middle::ty;

use std::str;
use std::uint;
use std::vec::Vec;
use syntax::abi::AbiSet;
use syntax::abi;
use syntax::ast;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/metadata/tyencode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ use std::io;
use std::io::MemWriter;
use std::str;
use std::fmt;
use std::vec::Vec;

use middle::ty::param_ty;
use middle::ty;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/middle/astencode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ use std::cast;
use std::cell::RefCell;
use std::io::Seek;
use std::rc::Rc;
use std::vec::Vec;

use serialize::ebml::reader;
use serialize::ebml;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/middle/borrowck/check_loans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ use middle::borrowck::*;
use middle::moves;
use middle::ty;
use middle::typeck::MethodCall;
use std::vec::Vec;
use syntax::ast;
use syntax::ast_util;
use syntax::codemap::Span;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/middle/borrowck/gather_loans/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ use middle::typeck::MethodCall;
use util::common::indenter;
use util::ppaux::{Repr};

use std::vec::Vec;
use syntax::ast;
use syntax::ast_util;
use syntax::ast_util::IdRange;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/middle/borrowck/gather_loans/restrictions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
* Computes the restrictions that result from a borrow.
*/

use std::vec::Vec;
use std::vec;
use middle::borrowck::*;
use mc = middle::mem_categorization;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/middle/borrowck/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ use std::cell::{Cell, RefCell};
use collections::HashMap;
use std::ops::{BitOr, BitAnd};
use std::result::{Result};
use std::vec::Vec;
use syntax::ast;
use syntax::ast_map;
use syntax::ast_util;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/middle/borrowck/move_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ comments in the section "Moves and initialization" and in `doc.rs`.

use std::cell::RefCell;
use std::uint;
use std::vec::Vec;
use collections::{HashMap, HashSet};
use middle::borrowck::*;
use middle::dataflow::DataFlowContext;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/middle/cfg/construct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use middle::cfg::*;
use middle::graph;
use middle::typeck;
use middle::ty;
use std::vec::Vec;
use syntax::ast;
use syntax::ast_util;
use syntax::opt_vec;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/middle/check_const.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use middle::ty;
use middle::typeck;
use util::ppaux;

use std::vec::Vec;
use syntax::ast::*;
use syntax::{ast_util, ast_map};
use syntax::visit::Visitor;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/middle/check_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use util::ppaux::ty_to_str;

use std::cmp;
use std::iter;
use std::vec::Vec;
use std::vec;
use syntax::ast::*;
use syntax::ast_util::{unguarded_pat, walk_pat};
Expand Down
Loading