Skip to content

Commit 91486df

Browse files
committed
Fix unstable check.
1 parent 11e893f commit 91486df

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

src/types/never.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ The never type `!` is a type with no values, representing the result of
77
computations that never complete. Expressions of type `!` can be coerced into
88
any other type.
99

10-
```rust,should_panic
11-
#![feature(never_type)]
10+
<!-- ignore: unstable -->
11+
```rust,ignore
1212
let x: ! = panic!();
1313
// Can be coerced into any type.
1414
let y: u32 = x;

stable-check/Cargo.lock

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

stable-check/src/main.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,15 @@ fn check_directory(dir: &Path) -> Result<(), Box<dyn Error>> {
2626
let path = entry.path();
2727

2828
if path.is_dir() {
29-
continue;
29+
return check_directory(&path);
3030
}
3131

3232
let mut file = File::open(&path)?;
3333
let mut contents = String::new();
3434
file.read_to_string(&mut contents)?;
3535

3636
if contents.contains("#![feature") {
37-
// `attributes.md` contains this and it is legitimate.
38-
if !contents.contains("#![feature(feature1, feature2, feature3)]") {
39-
return Err(From::from(format!("Feature flag found in {:?}", path)));
40-
}
37+
return Err(From::from(format!("Feature flag found in {:?}", path)));
4138
}
4239
}
4340

0 commit comments

Comments
 (0)