Skip to content

Commit 9e1b082

Browse files
denzpThomas Bracht Laumann Jespersen
authored andcommitted
Disable "pretty" mode tests on stable
1 parent 8bb5edd commit 9e1b082

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

src/runtest.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,12 @@ impl<'test> TestCx<'test> {
263263
}
264264
}
265265

266+
#[cfg(feature = "stable")]
267+
fn run_pretty_test(&self) {
268+
self.fatal("pretty-printing tests can only be used with nightly Rust".into());
269+
}
270+
271+
#[cfg(not(feature = "stable"))]
266272
fn run_pretty_test(&self) {
267273
if self.props.pp_exact.is_some() {
268274
logv(self.config, "testing for exact pretty-printing".to_owned());

test-project/tests/tests.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,7 @@ fn run_mode(mode: &'static str) {
1919
fn compile_test() {
2020
run_mode("compile-fail");
2121
run_mode("run-pass");
22+
23+
#[cfg(not(feature = "stable"))]
2224
run_mode("pretty");
2325
}

0 commit comments

Comments
 (0)