mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
fix: unused test imports on non-nightly, prevent regression
This commit is contained in:
committed by
Caleb Cartwright
parent
281bf03e64
commit
89ca3f3a10
@@ -40,6 +40,10 @@ jobs:
|
||||
rustc -Vv
|
||||
cargo -V
|
||||
cargo build
|
||||
env:
|
||||
RUSTFLAGS: '-D warnings'
|
||||
|
||||
- name: test
|
||||
run: cargo test
|
||||
env:
|
||||
RUSTFLAGS: '-D warnings'
|
||||
|
||||
+4
-5
@@ -32,16 +32,15 @@ pub(crate) fn is_match(&self, file_name: &FileName) -> bool {
|
||||
|
||||
#[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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user