mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-22 03:44:24 +00:00
rollup merge of #22459: alexcrichton/feature-names
Conflicts: src/rustbook/main.rs
This commit is contained in:
commit
d8ba8b00a7
@ -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)]
|
||||
|
@ -276,7 +276,7 @@
|
||||
#![feature(int_uint)]
|
||||
#![feature(collections)]
|
||||
#![feature(core)]
|
||||
#![feature(io)]
|
||||
#![feature(old_io)]
|
||||
|
||||
use self::LabelText::*;
|
||||
|
||||
|
@ -171,7 +171,7 @@
|
||||
#![feature(box_syntax)]
|
||||
#![feature(int_uint)]
|
||||
#![feature(core)]
|
||||
#![feature(io)]
|
||||
#![feature(old_io)]
|
||||
#![feature(std_misc)]
|
||||
#![feature(env)]
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
#![feature(collections)]
|
||||
#![feature(core)]
|
||||
#![feature(int_uint)]
|
||||
#![feature(io)]
|
||||
#![feature(old_io)]
|
||||
#![feature(rustc_private)]
|
||||
#![feature(staged_api)]
|
||||
|
||||
|
@ -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)]
|
||||
|
@ -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)]
|
||||
|
@ -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)]
|
||||
|
@ -29,7 +29,7 @@
|
||||
#![feature(int_uint)]
|
||||
#![feature(libc)]
|
||||
#![feature(link_args)]
|
||||
#![feature(path)]
|
||||
#![feature(old_path)]
|
||||
#![feature(staged_api)]
|
||||
#![feature(std_misc)]
|
||||
|
||||
|
@ -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)]
|
||||
|
@ -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)]
|
||||
|
@ -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)]
|
||||
|
@ -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::*;
|
||||
|
@ -59,7 +59,7 @@
|
||||
//! println!("path exists: {}", path.exists());
|
||||
//! ```
|
||||
|
||||
#![unstable(feature = "path")]
|
||||
#![unstable(feature = "old_path")]
|
||||
|
||||
use core::marker::Sized;
|
||||
use ffi::CString;
|
||||
|
@ -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)]
|
||||
|
@ -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(unicode)]
|
||||
|
@ -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)]
|
||||
|
@ -11,10 +11,10 @@
|
||||
#![feature(box_syntax)]
|
||||
#![feature(collections)]
|
||||
#![feature(core)]
|
||||
#![feature(io)]
|
||||
#![feature(old_io)]
|
||||
#![feature(os)]
|
||||
#![feature(env)]
|
||||
#![feature(path)]
|
||||
#![feature(old_path)]
|
||||
#![feature(rustdoc)]
|
||||
|
||||
extern crate rustdoc;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user