diff --git a/src/types/never.md b/src/types/never.md index 80105b1cd..e32674272 100644 --- a/src/types/never.md +++ b/src/types/never.md @@ -7,8 +7,8 @@ The never type `!` is a type with no values, representing the result of computations that never complete. Expressions of type `!` can be coerced into any other type. -```rust,should_panic -#![feature(never_type)] + +```rust,ignore let x: ! = panic!(); // Can be coerced into any type. let y: u32 = x; diff --git a/stable-check/Cargo.lock b/stable-check/Cargo.lock index 9a3b307c9..982040de4 100644 --- a/stable-check/Cargo.lock +++ b/stable-check/Cargo.lock @@ -1,4 +1,6 @@ -[root] +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] name = "stable-check" version = "0.1.0" diff --git a/stable-check/src/main.rs b/stable-check/src/main.rs index c0b1acc83..fc56ff7bb 100644 --- a/stable-check/src/main.rs +++ b/stable-check/src/main.rs @@ -26,7 +26,7 @@ fn check_directory(dir: &Path) -> Result<(), Box> { let path = entry.path(); if path.is_dir() { - continue; + return check_directory(&path); } let mut file = File::open(&path)?; @@ -34,10 +34,7 @@ fn check_directory(dir: &Path) -> Result<(), Box> { file.read_to_string(&mut contents)?; if contents.contains("#![feature") { - // `attributes.md` contains this and it is legitimate. - if !contents.contains("#![feature(feature1, feature2, feature3)]") { - return Err(From::from(format!("Feature flag found in {:?}", path))); - } + return Err(From::from(format!("Feature flag found in {:?}", path))); } }