Remove the check for unstable features

We don't use nightly Rust anymore, nor do we try to land docs for
features while they're still unstable, so this check is no longer
needed. The tests will just fail if we try to use a feature flag in code
listings.
This commit is contained in:
Carol (Nichols || Goulding) 2019-09-30 20:29:07 -04:00
parent 26f87b6aa9
commit 5b2740e64a
No known key found for this signature in database
GPG Key ID: D04B39A6CA243902
4 changed files with 0 additions and 60 deletions

7
ci/build.sh Normal file → Executable file
View File

@ -4,13 +4,6 @@ set -e
export PATH=$PATH:/home/travis/.cargo/bin;
# Feature check
cd ci/stable-check
cargo run -- ../../src
cd ../..
echo 'Spellchecking...'
bash ci/spellcheck.sh list
echo 'Testing...'

View File

@ -1,4 +0,0 @@
[root]
name = "stable-check"
version = "0.1.0"

View File

@ -1,6 +0,0 @@
[package]
name = "stable-check"
version = "0.1.0"
authors = ["steveklabnik <steve@steveklabnik.com>"]
[dependencies]

View File

@ -1,43 +0,0 @@
use std::error::Error;
use std::env;
use std::fs;
use std::fs::File;
use std::io::prelude::*;
use std::path::Path;
fn main() {
let arg = env::args().nth(1).unwrap_or_else(|| {
println!("Please pass a src directory as the first argument");
std::process::exit(1);
});
match check_directory(&Path::new(&arg)) {
Ok(()) => println!("passed!"),
Err(e) => {
println!("Error: {}", e);
std::process::exit(1);
}
}
}
fn check_directory(dir: &Path) -> Result<(), Box<Error>> {
for entry in fs::read_dir(dir)? {
let entry = entry?;
let path = entry.path();
if path.is_dir() {
continue;
}
let mut file = File::open(&path)?;
let mut contents = String::new();
file.read_to_string(&mut contents)?;
if contents.contains("#![feature") {
return Err(From::from(format!("Feature flag found in {:?}", path)));
}
}
Ok(())
}