about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorOliver Scherer <github35764891676564198441@oli-obk.de>2020-07-25 18:36:44 +0200
committerOliver Scherer <github35764891676564198441@oli-obk.de>2020-07-25 18:36:44 +0200
commit79c0db4cc845d6fc995aa3bbc320d89dadd55403 (patch)
treebd16da42b02541b90f6ad90c7a2e3fde59b7d36d /src/test
parent73ca84dfa1388dc8628ecb5e28bc8433fbc8b727 (diff)
downloadrust-79c0db4cc845d6fc995aa3bbc320d89dadd55403.tar.gz
rust-79c0db4cc845d6fc995aa3bbc320d89dadd55403.zip
Clean up some uses of logging in ui tests
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/issues/issue-18075.rs2
-rw-r--r--src/test/ui/logging-only-prints-once.rs8
-rw-r--r--src/test/ui/logging_before_rt_started.rs12
-rw-r--r--src/test/ui/threads-sendsync/spawning-with-debug.rs4
4 files changed, 8 insertions, 18 deletions
diff --git a/src/test/ui/issues/issue-18075.rs b/src/test/ui/issues/issue-18075.rs
index ee6845c1278..56ec629c613 100644
--- a/src/test/ui/issues/issue-18075.rs
+++ b/src/test/ui/issues/issue-18075.rs
@@ -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;
diff --git a/src/test/ui/logging-only-prints-once.rs b/src/test/ui/logging-only-prints-once.rs
index 6b49c441d1e..6d16819ceb0 100644
--- a/src/test/ui/logging-only-prints-once.rs
+++ b/src/test/ui/logging-only-prints-once.rs
@@ -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();
 }
diff --git a/src/test/ui/logging_before_rt_started.rs b/src/test/ui/logging_before_rt_started.rs
deleted file mode 100644
index 540d2b4f58a..00000000000
--- a/src/test/ui/logging_before_rt_started.rs
+++ /dev/null
@@ -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() {}
diff --git a/src/test/ui/threads-sendsync/spawning-with-debug.rs b/src/test/ui/threads-sendsync/spawning-with-debug.rs
index 388d62aa710..9d3487ffb29 100644
--- a/src/test/ui/threads-sendsync/spawning-with-debug.rs
+++ b/src/test/ui/threads-sendsync/spawning-with-debug.rs
@@ -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 || ());
 }