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.
This commit is contained in:
Yuki Okushi 2020-07-27 19:31:56 +09:00 committed by GitHub
commit 72aad35649
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 13 additions and 29 deletions

View File

@ -1,5 +1,4 @@
// run-pass
// exec-env:RUST_POISON_ON_FREE=1
// Test argument patterns where we create refs to the inside of
// boxes. Make sure that we don't free the box as we match the

View File

@ -1,5 +1,5 @@
// run-pass
// exec-env:RUSTC_LOG=rustc::middle=debug
// rustc-env:RUSTC_LOG=rustc::middle=debug
fn main() {
let b = 1isize;

View File

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

View File

@ -1,7 +1,6 @@
// run-pass
// ignore-windows
// ignore-emscripten no threads support
// exec-env:RUSTC_LOG=debug
use std::cell::Cell;
use std::fmt;
@ -19,10 +18,13 @@ impl fmt::Debug for Foo {
}
pub fn main() {
thread::spawn(move|| {
thread::spawn(move || {
let mut f = Foo(Cell::new(0));
println!("{:?}", f);
let Foo(ref mut f) = f;
assert_eq!(f.get(), 1);
}).join().ok().unwrap();
})
.join()
.ok()
.unwrap();
}

View File

@ -1,12 +0,0 @@
// run-pass
// exec-env:RUSTC_LOG=std::ptr
// In issue #9487, it was realized that std::ptr was invoking the logging
// infrastructure, and when std::ptr was used during runtime initialization,
// this caused some serious problems. The problems have since been fixed, but
// this test will trigger "output during runtime initialization" to make sure
// that the bug isn't re-introduced.
// pretty-expanded FIXME #23616
pub fn main() {}

View File

@ -1,5 +1,3 @@
// rustc-env:RUST_NEW_ERROR_FORMAT
#![feature(const_fn)]
trait Foo {

View File

@ -1,11 +1,11 @@
error[E0379]: functions in traits cannot be declared const
--> $DIR/const-fn-in-trait.rs:7:5
--> $DIR/const-fn-in-trait.rs:5:5
|
LL | const fn g();
| ^^^^^ functions in traits cannot be const
error[E0379]: functions in traits cannot be declared const
--> $DIR/const-fn-in-trait.rs:11:5
--> $DIR/const-fn-in-trait.rs:9:5
|
LL | const fn f() -> u32 { 22 }
| ^^^^^ functions in traits cannot be const

View File

@ -1,5 +1,3 @@
// rustc-env:RUST_NEW_ERROR_FORMAT
trait Foo {
fn foo(x: u16);
fn bar(&mut self, bar: &mut Bar);

View File

@ -1,5 +1,5 @@
error[E0053]: method `foo` has an incompatible type for trait
--> $DIR/trait-impl-fn-incompatibility.rs:11:15
--> $DIR/trait-impl-fn-incompatibility.rs:9:15
|
LL | fn foo(x: u16);
| --- type in trait
@ -11,7 +11,7 @@ LL | fn foo(x: i16) { }
found fn pointer `fn(i16)`
error[E0053]: method `bar` has an incompatible type for trait
--> $DIR/trait-impl-fn-incompatibility.rs:12:28
--> $DIR/trait-impl-fn-incompatibility.rs:10:28
|
LL | fn bar(&mut self, bar: &mut Bar);
| -------- type in trait

View File

@ -2,7 +2,7 @@
#![allow(unused_must_use)]
#![allow(unused_mut)]
// ignore-windows
// exec-env:RUSTC_LOG=debug
// exec-env:RUST_LOG=debug
// ignore-emscripten no threads support
// regression test for issue #10405, make sure we don't call println! too soon.
@ -11,5 +11,5 @@ use std::thread::Builder;
pub fn main() {
let mut t = Builder::new();
t.spawn(move|| ());
t.spawn(move || ());
}

View File

@ -623,7 +623,7 @@ impl<'test> TestCx<'test> {
.arg("-L")
.arg(&aux_dir)
.args(&self.props.compile_flags)
.envs(self.props.exec_env.clone());
.envs(self.props.rustc_env.clone());
self.maybe_add_external_args(
&mut rustc,
self.split_maybe_args(&self.config.target_rustcflags),