std: Rename io/path features with old_ prefix

This commit renames the features for the `std::old_io` and `std::old_path`
modules to `old_io` and `old_path` to help facilitate migration to the new APIs.

This is a breaking change as crates which mention the old feature names now need
to be renamed to use the new feature names.

[breaking-change]
This commit is contained in:
Alex Crichton 2015-02-17 11:05:44 -08:00
parent f1bb6c2f46
commit a2ebb24ee6
18 changed files with 36 additions and 37 deletions

View File

@ -13,8 +13,8 @@
#![feature(box_syntax)]
#![feature(collections)]
#![feature(int_uint)]
#![feature(io)]
#![feature(path)]
#![feature(old_io)]
#![feature(old_path)]
#![feature(rustc_private)]
#![feature(unboxed_closures)]
#![feature(std_misc)]

View File

@ -276,7 +276,7 @@
#![feature(int_uint)]
#![feature(collections)]
#![feature(core)]
#![feature(io)]
#![feature(old_io)]
use self::LabelText::*;

View File

@ -171,7 +171,7 @@
#![feature(box_syntax)]
#![feature(int_uint)]
#![feature(core)]
#![feature(io)]
#![feature(old_io)]
#![feature(std_misc)]
#![feature(env)]

View File

@ -28,7 +28,7 @@
#![feature(collections)]
#![feature(core)]
#![feature(int_uint)]
#![feature(io)]
#![feature(old_io)]
#![feature(rustc_private)]
#![feature(staged_api)]

View File

@ -29,10 +29,10 @@
#![feature(core)]
#![feature(hash)]
#![feature(int_uint)]
#![feature(io)]
#![feature(old_io)]
#![feature(libc)]
#![feature(env)]
#![feature(path)]
#![feature(old_path)]
#![feature(quote)]
#![feature(rustc_diagnostic_macros)]
#![feature(rustc_private)]

View File

@ -35,9 +35,9 @@
#![feature(core)]
#![feature(hash)]
#![feature(int_uint)]
#![feature(io)]
#![feature(old_io)]
#![feature(os)]
#![feature(path)]
#![feature(old_path)]
#![feature(rustc_private)]
#![feature(staged_api)]
#![feature(env)]

View File

@ -28,10 +28,10 @@
#![feature(core)]
#![feature(env)]
#![feature(int_uint)]
#![feature(io)]
#![feature(old_io)]
#![feature(libc)]
#![feature(os)]
#![feature(path)]
#![feature(old_path)]
#![feature(quote)]
#![feature(rustc_diagnostic_macros)]
#![feature(rustc_private)]

View File

@ -29,7 +29,7 @@
#![feature(int_uint)]
#![feature(libc)]
#![feature(link_args)]
#![feature(path)]
#![feature(old_path)]
#![feature(staged_api)]
#![feature(std_misc)]

View File

@ -30,10 +30,10 @@
#![feature(core)]
#![feature(hash)]
#![feature(int_uint)]
#![feature(io)]
#![feature(old_io)]
#![feature(env)]
#![feature(libc)]
#![feature(path)]
#![feature(old_path)]
#![feature(quote)]
#![feature(rustc_diagnostic_macros)]
#![feature(rustc_private)]

View File

@ -25,10 +25,10 @@
#![feature(env)]
#![feature(hash)]
#![feature(int_uint)]
#![feature(io)]
#![feature(old_io)]
#![feature(libc)]
#![feature(os)]
#![feature(path)]
#![feature(old_path)]
#![feature(rustc_private)]
#![feature(staged_api)]
#![feature(std_misc)]

View File

@ -29,8 +29,8 @@ Core encoding and decoding interfaces.
#![feature(collections)]
#![feature(core)]
#![feature(int_uint)]
#![feature(io)]
#![feature(path)]
#![feature(old_io)]
#![feature(old_path)]
#![feature(hash)]
#![feature(rustc_private)]
#![feature(staged_api)]

View File

@ -238,7 +238,7 @@
//! concerned with error handling; instead its caller is responsible for
//! responding to errors that may occur while attempting to read the numbers.
#![unstable(feature = "io")]
#![unstable(feature = "old_io")]
#![deny(unused_must_use)]
pub use self::SeekStyle::*;

View File

@ -59,7 +59,7 @@
//! println!("path exists: {}", path.exists());
//! ```
#![unstable(feature = "path")]
#![unstable(feature = "old_path")]
use core::marker::Sized;
use ffi::CString;

View File

@ -30,9 +30,9 @@
#![feature(env)]
#![feature(hash)]
#![feature(int_uint)]
#![feature(io)]
#![feature(old_io)]
#![feature(libc)]
#![feature(path)]
#![feature(old_path)]
#![feature(quote, unsafe_destructor)]
#![feature(rustc_private)]
#![feature(staged_api)]

View File

@ -54,8 +54,8 @@
#![feature(box_syntax)]
#![feature(collections)]
#![feature(int_uint)]
#![feature(io)]
#![feature(path)]
#![feature(old_io)]
#![feature(old_path)]
#![feature(rustc_private)]
#![feature(staged_api)]
#![feature(std_misc)]

View File

@ -39,8 +39,8 @@
#![feature(env)]
#![feature(hash)]
#![feature(int_uint)]
#![feature(io)]
#![feature(path)]
#![feature(old_io)]
#![feature(old_path)]
#![feature(rustc_private)]
#![feature(staged_api)]
#![feature(std_misc)]

View File

@ -11,9 +11,9 @@
#![feature(box_syntax)]
#![feature(collections)]
#![feature(core)]
#![feature(io)]
#![feature(old_io)]
#![feature(os)]
#![feature(path)]
#![feature(old_path)]
#![feature(rustdoc)]
extern crate rustdoc;

View File

@ -12,12 +12,14 @@
#![allow(dead_code)]
#![deny(non_snake_case)]
#![feature(path)]
#![feature(io)]
use std::old_io::File;
use std::old_io::IoError;
mod foo {
pub enum Foo { Foo }
}
struct Something {
X: usize //~ ERROR structure field `X` should have a snake case name such as `x`
}
@ -30,13 +32,10 @@ fn main() {
let Test: usize = 0; //~ ERROR variable `Test` should have a snake case name such as `test`
println!("{}", Test);
let mut f = File::open(&Path::new("something.txt"));
let mut buff = [0u8; 16];
match f.read(&mut buff) {
Ok(cnt) => println!("read this many bytes: {}", cnt),
Err(IoError{ kind: EndOfFile, .. }) => println!("Got end of file: {:?}", EndOfFile),
//~^ ERROR variable `EndOfFile` should have a snake case name such as `end_of_file`
//~^^ WARN `EndOfFile` is named the same as one of the variants of the type `std::old_io::IoErrorKind`
match foo::Foo::Foo {
Foo => {}
//~^ ERROR variable `Foo` should have a snake case name such as `foo`
//~^^ WARN `Foo` is named the same as one of the variants of the type `foo::Foo`
}
test(1);