Skip to content

Commit a2ebb24

Browse files
committed
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]
1 parent f1bb6c2 commit a2ebb24

File tree

18 files changed

+36
-37
lines changed

18 files changed

+36
-37
lines changed

src/compiletest/compiletest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
#![feature(box_syntax)]
1414
#![feature(collections)]
1515
#![feature(int_uint)]
16-
#![feature(io)]
17-
#![feature(path)]
16+
#![feature(old_io)]
17+
#![feature(old_path)]
1818
#![feature(rustc_private)]
1919
#![feature(unboxed_closures)]
2020
#![feature(std_misc)]

src/libgraphviz/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@
276276
#![feature(int_uint)]
277277
#![feature(collections)]
278278
#![feature(core)]
279-
#![feature(io)]
279+
#![feature(old_io)]
280280

281281
use self::LabelText::*;
282282

src/liblog/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@
171171
#![feature(box_syntax)]
172172
#![feature(int_uint)]
173173
#![feature(core)]
174-
#![feature(io)]
174+
#![feature(old_io)]
175175
#![feature(std_misc)]
176176
#![feature(env)]
177177

src/librbml/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#![feature(collections)]
2929
#![feature(core)]
3030
#![feature(int_uint)]
31-
#![feature(io)]
31+
#![feature(old_io)]
3232
#![feature(rustc_private)]
3333
#![feature(staged_api)]
3434

src/librustc/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
#![feature(core)]
3030
#![feature(hash)]
3131
#![feature(int_uint)]
32-
#![feature(io)]
32+
#![feature(old_io)]
3333
#![feature(libc)]
3434
#![feature(env)]
35-
#![feature(path)]
35+
#![feature(old_path)]
3636
#![feature(quote)]
3737
#![feature(rustc_diagnostic_macros)]
3838
#![feature(rustc_private)]

src/librustc_back/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
#![feature(core)]
3636
#![feature(hash)]
3737
#![feature(int_uint)]
38-
#![feature(io)]
38+
#![feature(old_io)]
3939
#![feature(os)]
40-
#![feature(path)]
40+
#![feature(old_path)]
4141
#![feature(rustc_private)]
4242
#![feature(staged_api)]
4343
#![feature(env)]

src/librustc_driver/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
#![feature(core)]
2929
#![feature(env)]
3030
#![feature(int_uint)]
31-
#![feature(io)]
31+
#![feature(old_io)]
3232
#![feature(libc)]
3333
#![feature(os)]
34-
#![feature(path)]
34+
#![feature(old_path)]
3535
#![feature(quote)]
3636
#![feature(rustc_diagnostic_macros)]
3737
#![feature(rustc_private)]

src/librustc_llvm/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#![feature(int_uint)]
3030
#![feature(libc)]
3131
#![feature(link_args)]
32-
#![feature(path)]
32+
#![feature(old_path)]
3333
#![feature(staged_api)]
3434
#![feature(std_misc)]
3535

src/librustc_trans/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030
#![feature(core)]
3131
#![feature(hash)]
3232
#![feature(int_uint)]
33-
#![feature(io)]
33+
#![feature(old_io)]
3434
#![feature(env)]
3535
#![feature(libc)]
36-
#![feature(path)]
36+
#![feature(old_path)]
3737
#![feature(quote)]
3838
#![feature(rustc_diagnostic_macros)]
3939
#![feature(rustc_private)]

src/librustdoc/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
#![feature(env)]
2626
#![feature(hash)]
2727
#![feature(int_uint)]
28-
#![feature(io)]
28+
#![feature(old_io)]
2929
#![feature(libc)]
3030
#![feature(os)]
31-
#![feature(path)]
31+
#![feature(old_path)]
3232
#![feature(rustc_private)]
3333
#![feature(staged_api)]
3434
#![feature(std_misc)]

src/libserialize/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ Core encoding and decoding interfaces.
2929
#![feature(collections)]
3030
#![feature(core)]
3131
#![feature(int_uint)]
32-
#![feature(io)]
33-
#![feature(path)]
32+
#![feature(old_io)]
33+
#![feature(old_path)]
3434
#![feature(hash)]
3535
#![feature(rustc_private)]
3636
#![feature(staged_api)]

src/libstd/old_io/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@
238238
//! concerned with error handling; instead its caller is responsible for
239239
//! responding to errors that may occur while attempting to read the numbers.
240240
241-
#![unstable(feature = "io")]
241+
#![unstable(feature = "old_io")]
242242
#![deny(unused_must_use)]
243243

244244
pub use self::SeekStyle::*;

src/libstd/old_path/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
//! println!("path exists: {}", path.exists());
6060
//! ```
6161
62-
#![unstable(feature = "path")]
62+
#![unstable(feature = "old_path")]
6363

6464
use core::marker::Sized;
6565
use ffi::CString;

src/libsyntax/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
#![feature(env)]
3131
#![feature(hash)]
3232
#![feature(int_uint)]
33-
#![feature(io)]
33+
#![feature(old_io)]
3434
#![feature(libc)]
35-
#![feature(path)]
35+
#![feature(old_path)]
3636
#![feature(quote, unsafe_destructor)]
3737
#![feature(rustc_private)]
3838
#![feature(staged_api)]

src/libterm/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
#![feature(box_syntax)]
5555
#![feature(collections)]
5656
#![feature(int_uint)]
57-
#![feature(io)]
58-
#![feature(path)]
57+
#![feature(old_io)]
58+
#![feature(old_path)]
5959
#![feature(rustc_private)]
6060
#![feature(staged_api)]
6161
#![feature(std_misc)]

src/libtest/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
#![feature(env)]
4040
#![feature(hash)]
4141
#![feature(int_uint)]
42-
#![feature(io)]
43-
#![feature(path)]
42+
#![feature(old_io)]
43+
#![feature(old_path)]
4444
#![feature(rustc_private)]
4545
#![feature(staged_api)]
4646
#![feature(std_misc)]

src/rustbook/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
#![feature(box_syntax)]
1212
#![feature(collections)]
1313
#![feature(core)]
14-
#![feature(io)]
14+
#![feature(old_io)]
1515
#![feature(os)]
16-
#![feature(path)]
16+
#![feature(old_path)]
1717
#![feature(rustdoc)]
1818

1919
extern crate rustdoc;

src/test/compile-fail/lint-uppercase-variables.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212

1313
#![allow(dead_code)]
1414
#![deny(non_snake_case)]
15-
#![feature(path)]
16-
#![feature(io)]
1715

1816
use std::old_io::File;
1917
use std::old_io::IoError;
2018

19+
mod foo {
20+
pub enum Foo { Foo }
21+
}
22+
2123
struct Something {
2224
X: usize //~ ERROR structure field `X` should have a snake case name such as `x`
2325
}
@@ -30,13 +32,10 @@ fn main() {
3032
let Test: usize = 0; //~ ERROR variable `Test` should have a snake case name such as `test`
3133
println!("{}", Test);
3234

33-
let mut f = File::open(&Path::new("something.txt"));
34-
let mut buff = [0u8; 16];
35-
match f.read(&mut buff) {
36-
Ok(cnt) => println!("read this many bytes: {}", cnt),
37-
Err(IoError{ kind: EndOfFile, .. }) => println!("Got end of file: {:?}", EndOfFile),
38-
//~^ ERROR variable `EndOfFile` should have a snake case name such as `end_of_file`
39-
//~^^ WARN `EndOfFile` is named the same as one of the variants of the type `std::old_io::IoErrorKind`
35+
match foo::Foo::Foo {
36+
Foo => {}
37+
//~^ ERROR variable `Foo` should have a snake case name such as `foo`
38+
//~^^ WARN `Foo` is named the same as one of the variants of the type `foo::Foo`
4039
}
4140

4241
test(1);

0 commit comments

Comments
 (0)