diff --git a/src/cargo-fmt/main.rs b/src/cargo-fmt/main.rs index e9e92b73f0c..a070b45426f 100644 --- a/src/cargo-fmt/main.rs +++ b/src/cargo-fmt/main.rs @@ -917,10 +917,11 @@ mod cargo_fmt_tests { let exp_other = PathBuf::from( "tests/nested-test-files/root-and-nested-tests/tests/nested/other.rs", ); - assert_eq!( - Some(vec![exp_baz, exp_foo_bar, exp_other]), - get_nested_integration_test_files(&target_dir, &target_dir), - ) + let files = get_nested_integration_test_files(&target_dir, &target_dir).unwrap(); + assert_eq!(3, files.len()); + assert!(files.contains(&exp_baz)); + assert!(files.contains(&exp_foo_bar)); + assert!(files.contains(&exp_other)); } } diff --git a/src/config/mod.rs b/src/config/mod.rs index 1d0217f27b1..94f390ceef4 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -476,6 +476,9 @@ mod test { #[test] fn test_valid_license_template_path() { + if !crate::is_nightly_channel!() { + return; + } let toml = r#"license_template_path = "tests/license-template/lt.txt""#; let config = Config::from_toml(toml, Path::new("")).unwrap(); assert!(config.license_template.is_some()); diff --git a/tests/config/issue-3779.toml b/tests/config/issue-3779.toml index 83505f409af..6ca52aee322 100644 --- a/tests/config/issue-3779.toml +++ b/tests/config/issue-3779.toml @@ -1,4 +1,3 @@ -unstable_features = true ignore = [ "tests/**/issue-3779/ice.rs" ] diff --git a/tests/source/issue-3779/lib.rs b/tests/source/issue-3779/lib.rs index d7c2ae28975..16e9d48337b 100644 --- a/tests/source/issue-3779/lib.rs +++ b/tests/source/issue-3779/lib.rs @@ -1,3 +1,4 @@ +// rustfmt-unstable: true // rustfmt-config: issue-3779.toml #[path = "ice.rs"] diff --git a/tests/target/issue-3779/lib.rs b/tests/target/issue-3779/lib.rs index ebebce417d1..a5673a4db7e 100644 --- a/tests/target/issue-3779/lib.rs +++ b/tests/target/issue-3779/lib.rs @@ -1,3 +1,4 @@ +// rustfmt-unstable: true // rustfmt-config: issue-3779.toml #[path = "ice.rs"]