about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-02-17 15:16:22 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-02-17 17:26:59 -0800
commitd8ba8b00a7be7c9aba8fb5a6c0174e526c5a3d4d (patch)
treee5174e340d1249a638ed4b75fa52d22309bf8e66 /src/test
parentc166fd3041208bda4a55e1fcaaf14a38cc3d6158 (diff)
parenta2ebb24ee6cc76791ef834cb2d17ecac95756499 (diff)
downloadrust-d8ba8b00a7be7c9aba8fb5a6c0174e526c5a3d4d.tar.gz
rust-d8ba8b00a7be7c9aba8fb5a6c0174e526c5a3d4d.zip
rollup merge of #22459: alexcrichton/feature-names
Conflicts:
	src/rustbook/main.rs
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/lint-uppercase-variables.rs17
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);