Skip to content

Commit 0312958

Browse files
committed
Run self_tests only on nightly channel
We need to keep this nightly-only while edition configuration option is unstable.
1 parent c8409be commit 0312958

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/test/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,10 @@ fn idempotence_tests() {
231231
// no warnings are emitted.
232232
#[test]
233233
fn self_tests() {
234+
match option_env!("CFG_RELEASE_CHANNEL") {
235+
None | Some("nightly") => {}
236+
_ => return, // these tests require nightly
237+
}
234238
let mut files = get_test_files(Path::new("tests"), false);
235239
let bin_directories = vec!["cargo-fmt", "git-rustfmt", "bin", "format-diff"];
236240
for dir in bin_directories {

0 commit comments

Comments
 (0)