diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-02-17 11:05:44 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-02-17 14:02:45 -0800 |
| commit | a2ebb24ee6cc76791ef834cb2d17ecac95756499 (patch) | |
| tree | e5d36b629fd385fde548cd621245cd9b03abdf3c /src/test | |
| parent | f1bb6c2f46f08c1d7b6d695f5b3cf93142cb8860 (diff) | |
| download | rust-a2ebb24ee6cc76791ef834cb2d17ecac95756499.tar.gz rust-a2ebb24ee6cc76791ef834cb2d17ecac95756499.zip | |
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]
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/lint-uppercase-variables.rs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/test/compile-fail/lint-uppercase-variables.rs b/src/test/compile-fail/lint-uppercase-variables.rs index 057b8e3acc6..b68d9dc4645 100644 --- a/src/test/compile-fail/lint-uppercase-variables.rs +++ b/src/test/compile-fail/lint-uppercase-variables.rs @@ -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); |
