Skip to content

std: Rename io/path features with old_ prefix #22459

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

Merged
merged 1 commit into from
Feb 18, 2015
Merged
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
4 changes: 2 additions & 2 deletions src/compiletest/compiletest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion src/libgraphviz/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
#![feature(int_uint)]
#![feature(collections)]
#![feature(core)]
#![feature(io)]
#![feature(old_io)]

use self::LabelText::*;

Expand Down
2 changes: 1 addition & 1 deletion src/liblog/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
#![feature(box_syntax)]
#![feature(int_uint)]
#![feature(core)]
#![feature(io)]
#![feature(old_io)]
#![feature(std_misc)]
#![feature(env)]

Expand Down
2 changes: 1 addition & 1 deletion src/librbml/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#![feature(collections)]
#![feature(core)]
#![feature(int_uint)]
#![feature(io)]
#![feature(old_io)]
#![feature(rustc_private)]
#![feature(staged_api)]

Expand Down
4 changes: 2 additions & 2 deletions src/librustc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_back/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_driver/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_llvm/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#![feature(int_uint)]
#![feature(libc)]
#![feature(link_args)]
#![feature(path)]
#![feature(old_path)]
#![feature(staged_api)]
#![feature(std_misc)]

Expand Down
4 changes: 2 additions & 2 deletions src/librustc_trans/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
4 changes: 2 additions & 2 deletions src/librustdoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
4 changes: 2 additions & 2 deletions src/libserialize/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/old_io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/old_path/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
//! println!("path exists: {}", path.exists());
//! ```

#![unstable(feature = "path")]
#![unstable(feature = "old_path")]

use core::marker::Sized;
use ffi::CString;
Expand Down
4 changes: 2 additions & 2 deletions src/libsyntax/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
4 changes: 2 additions & 2 deletions src/libterm/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
4 changes: 2 additions & 2 deletions src/libtest/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
4 changes: 2 additions & 2 deletions src/rustbook/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
17 changes: 8 additions & 9 deletions src/test/compile-fail/lint-uppercase-variables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`
}
Expand All @@ -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);
Expand Down