Skip to content

Commit a980587

Browse files
authored
Rollup merge of #90029 - tgnottingham:incr-debug-logging-test, r=Mark-Simulacrum
Add test for debug logging during incremental compilation Debug logging during incremental compilation had been broken for some time, until #89343 fixed it (among other things). Add a test so this is less likely to break without being noticed. This test is nearly a copy of the `src/test/ui/rustc-rust-log.rs` test, but tests debug logging in the incremental compliation code paths.
2 parents d29e98f + aefbd40 commit a980587

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// rustc-env:RUSTC_LOG=debug
2+
#[cfg(rpass1)]
3+
pub fn foo() {}
4+
5+
#[cfg(rpass2)]
6+
pub fn foo() {
7+
println!();
8+
}
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// revisions: rpass1 rpass2
2+
// This test is just checking that we won't ICE if logging is turned
3+
// on; don't bother trying to compare that (copious) output.
4+
//
5+
// dont-check-compiler-stdout
6+
// dont-check-compiler-stderr
7+
// aux-build: rustc-rust-log-aux.rs
8+
// rustc-env:RUSTC_LOG=debug
9+
10+
#[cfg(rpass1)]
11+
fn main() {}
12+
13+
#[cfg(rpass2)]
14+
fn main() {
15+
println!();
16+
}

src/test/ui/rustc-rust-log.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
// run-pass
22
// This test is just checking that we won't ICE if logging is turned
3-
// on; don't bother trying to compare that (copious) output. (Note
4-
// also that this test potentially silly, since we do not build+test
5-
// debug versions of rustc as part of our continuous integration
6-
// process...)
3+
// on; don't bother trying to compare that (copious) output.
74
//
85
// dont-check-compiler-stdout
96
// dont-check-compiler-stderr

0 commit comments

Comments
 (0)