Skip to content

Commit 89ca3f3

Browse files
fix: unused test imports on non-nightly, prevent regression
1 parent 281bf03 commit 89ca3f3

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

Diff for: .github/workflows/linux.yml

+4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ jobs:
4040
rustc -Vv
4141
cargo -V
4242
cargo build
43+
env:
44+
RUSTFLAGS: '-D warnings'
4345

4446
- name: test
4547
run: cargo test
48+
env:
49+
RUSTFLAGS: '-D warnings'

Diff for: src/ignore_path.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,15 @@ impl IgnorePathSet {
3232

3333
#[cfg(test)]
3434
mod test {
35-
use std::path::{Path, PathBuf};
36-
37-
use crate::config::{Config, FileName};
38-
use crate::ignore_path::IgnorePathSet;
39-
4035
use rustfmt_config_proc_macro::nightly_only_test;
4136

4237
#[nightly_only_test]
4338
#[test]
4439
fn test_ignore_path_set() {
40+
use crate::config::{Config, FileName};
41+
use crate::ignore_path::IgnorePathSet;
42+
use std::path::{Path, PathBuf};
43+
4544
let config =
4645
Config::from_toml(r#"ignore = ["foo.rs", "bar_dir/*"]"#, Path::new("")).unwrap();
4746
let ignore_path_set = IgnorePathSet::from_ignore_list(&config.ignore()).unwrap();

Diff for: src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#![warn(unreachable_pub)]
44
#![recursion_limit = "256"]
55
#![allow(clippy::match_like_matches_macro)]
6-
#![allow(unreachable_pub)]
76

87
#[macro_use]
98
extern crate derive_new;

0 commit comments

Comments
 (0)