diff options
| author | Caleb Cartwright <caleb.cartwright@outlook.com> | 2022-02-23 21:37:42 -0600 |
|---|---|---|
| committer | Caleb Cartwright <calebcartwright@users.noreply.github.com> | 2022-02-23 22:51:32 -0600 |
| commit | 89ca3f3a100456d652b156b1a62b8e244e526c4e (patch) | |
| tree | 7dbad73cee5b7f74207e18d14d3ae6ac4ab096aa | |
| parent | 281bf03e6492bf2627c24ea502ce5fd567d7a08e (diff) | |
| download | rust-89ca3f3a100456d652b156b1a62b8e244e526c4e.tar.gz rust-89ca3f3a100456d652b156b1a62b8e244e526c4e.zip | |
fix: unused test imports on non-nightly, prevent regression
| -rw-r--r-- | .github/workflows/linux.yml | 4 | ||||
| -rw-r--r-- | src/ignore_path.rs | 9 | ||||
| -rw-r--r-- | src/lib.rs | 1 |
3 files changed, 8 insertions, 6 deletions
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index db497941642..45f63b83c05 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -40,6 +40,10 @@ jobs: rustc -Vv cargo -V cargo build + env: + RUSTFLAGS: '-D warnings' - name: test run: cargo test + env: + RUSTFLAGS: '-D warnings' diff --git a/src/ignore_path.rs b/src/ignore_path.rs index 7738eee0a76..d955949496a 100644 --- a/src/ignore_path.rs +++ b/src/ignore_path.rs @@ -32,16 +32,15 @@ impl IgnorePathSet { #[cfg(test)] mod test { - use std::path::{Path, PathBuf}; - - use crate::config::{Config, FileName}; - use crate::ignore_path::IgnorePathSet; - use rustfmt_config_proc_macro::nightly_only_test; #[nightly_only_test] #[test] fn test_ignore_path_set() { + use crate::config::{Config, FileName}; + use crate::ignore_path::IgnorePathSet; + use std::path::{Path, PathBuf}; + let config = Config::from_toml(r#"ignore = ["foo.rs", "bar_dir/*"]"#, Path::new("")).unwrap(); let ignore_path_set = IgnorePathSet::from_ignore_list(&config.ignore()).unwrap(); diff --git a/src/lib.rs b/src/lib.rs index fae8080c02e..ad23b16e02e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,7 +3,6 @@ #![warn(unreachable_pub)] #![recursion_limit = "256"] #![allow(clippy::match_like_matches_macro)] -#![allow(unreachable_pub)] #[macro_use] extern crate derive_new; |
