about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2020-05-02 14:39:19 +0200
committerRalf Jung <post@ralfj.de>2020-05-02 14:39:19 +0200
commit89666ab6b405ba95ba4a32da7ebe95d8f89b73d2 (patch)
treea531a9cc931325a534f47cc6a1b8db67466fa0a8 /src/test
parent17ca7a0e480bf405082d9b9ac27b3c1fe94d9e33 (diff)
downloadrust-89666ab6b405ba95ba4a32da7ebe95d8f89b73d2.tar.gz
rust-89666ab6b405ba95ba4a32da7ebe95d8f89b73d2.zip
fix miri-unleash delayed sanity checking
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/consts/miri_unleashed/const_refers_to_static.rs4
-rw-r--r--src/test/ui/consts/miri_unleashed/const_refers_to_static.stderr12
2 files changed, 7 insertions, 9 deletions
diff --git a/src/test/ui/consts/miri_unleashed/const_refers_to_static.rs b/src/test/ui/consts/miri_unleashed/const_refers_to_static.rs
index 0203f13ef61..7c8cdaec4a1 100644
--- a/src/test/ui/consts/miri_unleashed/const_refers_to_static.rs
+++ b/src/test/ui/consts/miri_unleashed/const_refers_to_static.rs
@@ -1,8 +1,6 @@
 // build-fail
 // compile-flags: -Zunleash-the-miri-inside-of-you -Zdeduplicate-diagnostics
 #![allow(const_err)]
-#![feature(const_raw_ptr_deref)] // FIXME: cannot remove because then rustc thinks there is no error
-#![crate_type = "lib"]
 
 use std::sync::atomic::AtomicUsize;
 use std::sync::atomic::Ordering;
@@ -26,7 +24,7 @@ static mut MUTABLE: u32 = 0;
 const READ_MUT: u32 = unsafe { MUTABLE };
 //~^ WARN skipping const checks
 
-pub fn main() {
+fn main() {
     MUTATE_INTERIOR_MUT;
     //~^ ERROR: erroneous constant used
     READ_INTERIOR_MUT;
diff --git a/src/test/ui/consts/miri_unleashed/const_refers_to_static.stderr b/src/test/ui/consts/miri_unleashed/const_refers_to_static.stderr
index 322f98d5445..7e049647cfd 100644
--- a/src/test/ui/consts/miri_unleashed/const_refers_to_static.stderr
+++ b/src/test/ui/consts/miri_unleashed/const_refers_to_static.stderr
@@ -1,5 +1,5 @@
 warning: skipping const checks
-  --> $DIR/const_refers_to_static.rs:13:1
+  --> $DIR/const_refers_to_static.rs:11:1
    |
 LL | / const MUTATE_INTERIOR_MUT: usize = {
 LL | |
@@ -9,7 +9,7 @@ LL | | };
    | |__^
 
 warning: skipping const checks
-  --> $DIR/const_refers_to_static.rs:19:1
+  --> $DIR/const_refers_to_static.rs:17:1
    |
 LL | / const READ_INTERIOR_MUT: usize = {
 LL | |
@@ -19,25 +19,25 @@ LL | | };
    | |__^
 
 warning: skipping const checks
-  --> $DIR/const_refers_to_static.rs:26:1
+  --> $DIR/const_refers_to_static.rs:24:1
    |
 LL | const READ_MUT: u32 = unsafe { MUTABLE };
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0080]: erroneous constant used
-  --> $DIR/const_refers_to_static.rs:30:5
+  --> $DIR/const_refers_to_static.rs:28:5
    |
 LL |     MUTATE_INTERIOR_MUT;
    |     ^^^^^^^^^^^^^^^^^^^ referenced constant has errors
 
 error[E0080]: erroneous constant used
-  --> $DIR/const_refers_to_static.rs:32:5
+  --> $DIR/const_refers_to_static.rs:30:5
    |
 LL |     READ_INTERIOR_MUT;
    |     ^^^^^^^^^^^^^^^^^ referenced constant has errors
 
 error[E0080]: erroneous constant used
-  --> $DIR/const_refers_to_static.rs:34:5
+  --> $DIR/const_refers_to_static.rs:32:5
    |
 LL |     READ_MUT;
    |     ^^^^^^^^ referenced constant has errors