Skip to content

Commit 72aad35

Browse files
authored
Rollup merge of #74750 - oli-obk:logging_and_test_cleanups, r=JohnTitor
Clean up some uses of logging in ui tests The removed test can't possibly trigger anything today as we don't have logging in libstd. The `exec-env` flag was mistakenly used for adding env vars to rustc invocations both in test and in the test suite and there were some accidental renames from RUST_LOG to RUSTC_LOG that I reverted.
2 parents ba3c245 + 86ac65c commit 72aad35

11 files changed

+13
-29
lines changed

src/test/ui/binding/func-arg-ref-pattern.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// run-pass
2-
// exec-env:RUST_POISON_ON_FREE=1
32

43
// Test argument patterns where we create refs to the inside of
54
// boxes. Make sure that we don't free the box as we match the

src/test/ui/issues/issue-18075.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-pass
2-
// exec-env:RUSTC_LOG=rustc::middle=debug
2+
// rustc-env:RUSTC_LOG=rustc::middle=debug
33

44
fn main() {
55
let b = 1isize;

src/test/ui/issues/issue-34932.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// run-pass
22
// compile-flags:--test
3-
// rustc-env:RUSTC_BOOTSTRAP_KEY=
43
#![cfg(any())] // This test should be configured away
54
#![feature(rustc_attrs)] // Test that this is allowed on stable/beta
65
#![feature(iter_arith_traits)] // Test that this is not unused

src/test/ui/logging-only-prints-once.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// run-pass
22
// ignore-windows
33
// ignore-emscripten no threads support
4-
// exec-env:RUSTC_LOG=debug
54

65
use std::cell::Cell;
76
use std::fmt;
@@ -19,10 +18,13 @@ impl fmt::Debug for Foo {
1918
}
2019

2120
pub fn main() {
22-
thread::spawn(move|| {
21+
thread::spawn(move || {
2322
let mut f = Foo(Cell::new(0));
2423
println!("{:?}", f);
2524
let Foo(ref mut f) = f;
2625
assert_eq!(f.get(), 1);
27-
}).join().ok().unwrap();
26+
})
27+
.join()
28+
.ok()
29+
.unwrap();
2830
}

src/test/ui/logging_before_rt_started.rs

-12
This file was deleted.

src/test/ui/mismatched_types/const-fn-in-trait.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// rustc-env:RUST_NEW_ERROR_FORMAT
2-
31
#![feature(const_fn)]
42

53
trait Foo {

src/test/ui/mismatched_types/const-fn-in-trait.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0379]: functions in traits cannot be declared const
2-
--> $DIR/const-fn-in-trait.rs:7:5
2+
--> $DIR/const-fn-in-trait.rs:5:5
33
|
44
LL | const fn g();
55
| ^^^^^ functions in traits cannot be const
66

77
error[E0379]: functions in traits cannot be declared const
8-
--> $DIR/const-fn-in-trait.rs:11:5
8+
--> $DIR/const-fn-in-trait.rs:9:5
99
|
1010
LL | const fn f() -> u32 { 22 }
1111
| ^^^^^ functions in traits cannot be const

src/test/ui/mismatched_types/trait-impl-fn-incompatibility.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// rustc-env:RUST_NEW_ERROR_FORMAT
2-
31
trait Foo {
42
fn foo(x: u16);
53
fn bar(&mut self, bar: &mut Bar);

src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0053]: method `foo` has an incompatible type for trait
2-
--> $DIR/trait-impl-fn-incompatibility.rs:11:15
2+
--> $DIR/trait-impl-fn-incompatibility.rs:9:15
33
|
44
LL | fn foo(x: u16);
55
| --- type in trait
@@ -11,7 +11,7 @@ LL | fn foo(x: i16) { }
1111
found fn pointer `fn(i16)`
1212

1313
error[E0053]: method `bar` has an incompatible type for trait
14-
--> $DIR/trait-impl-fn-incompatibility.rs:12:28
14+
--> $DIR/trait-impl-fn-incompatibility.rs:10:28
1515
|
1616
LL | fn bar(&mut self, bar: &mut Bar);
1717
| -------- type in trait

src/test/ui/threads-sendsync/spawning-with-debug.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(unused_must_use)]
33
#![allow(unused_mut)]
44
// ignore-windows
5-
// exec-env:RUSTC_LOG=debug
5+
// exec-env:RUST_LOG=debug
66
// ignore-emscripten no threads support
77

88
// regression test for issue #10405, make sure we don't call println! too soon.
@@ -11,5 +11,5 @@ use std::thread::Builder;
1111

1212
pub fn main() {
1313
let mut t = Builder::new();
14-
t.spawn(move|| ());
14+
t.spawn(move || ());
1515
}

src/tools/compiletest/src/runtest.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ impl<'test> TestCx<'test> {
623623
.arg("-L")
624624
.arg(&aux_dir)
625625
.args(&self.props.compile_flags)
626-
.envs(self.props.exec_env.clone());
626+
.envs(self.props.rustc_env.clone());
627627
self.maybe_add_external_args(
628628
&mut rustc,
629629
self.split_maybe_args(&self.config.target_rustcflags),

0 commit comments

Comments
 (0)