Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up some uses of logging in ui tests #74750

Merged
merged 3 commits into from
Jul 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/test/ui/binding/func-arg-ref-pattern.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-18075.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/issues/issue-34932.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 5 additions & 3 deletions src/test/ui/logging-only-prints-once.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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();
}
12 changes: 0 additions & 12 deletions src/test/ui/logging_before_rt_started.rs

This file was deleted.

2 changes: 0 additions & 2 deletions src/test/ui/mismatched_types/const-fn-in-trait.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// rustc-env:RUST_NEW_ERROR_FORMAT

#![feature(const_fn)]

trait Foo {
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/mismatched_types/const-fn-in-trait.stderr
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/mismatched_types/trait-impl-fn-incompatibility.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// rustc-env:RUST_NEW_ERROR_FORMAT

trait Foo {
fn foo(x: u16);
fn bar(&mut self, bar: &mut Bar);
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/threads-sendsync/spawning-with-debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -11,5 +11,5 @@ use std::thread::Builder;

pub fn main() {
let mut t = Builder::new();
t.spawn(move|| ());
t.spawn(move || ());
}
2 changes: 1 addition & 1 deletion src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down