about summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorDylan MacKenzie <ecstaticmorse@gmail.com>2020-09-29 17:31:04 -0700
committerDylan MacKenzie <ecstaticmorse@gmail.com>2020-09-29 19:20:33 -0700
commit51fbd555f07febe07d2b8c5beab6f3520bebe460 (patch)
tree362b82c667743b4d5dc7c8c619299dd33ac24465 /src/test/ui/error-codes
parentb400871b9c07951d79dd9158af44dfdebcb8ad65 (diff)
downloadrust-51fbd555f07febe07d2b8c5beab6f3520bebe460.tar.gz
rust-51fbd555f07febe07d2b8c5beab6f3520bebe460.zip
Bless tests
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0010-teach.rs1
-rw-r--r--src/test/ui/error-codes/E0010-teach.stderr15
-rw-r--r--src/test/ui/error-codes/E0010.rs1
-rw-r--r--src/test/ui/error-codes/E0010.stderr13
-rw-r--r--src/test/ui/error-codes/E0017.rs2
-rw-r--r--src/test/ui/error-codes/E0017.stderr14
-rw-r--r--src/test/ui/error-codes/E0388.rs4
-rw-r--r--src/test/ui/error-codes/E0388.stderr14
8 files changed, 13 insertions, 51 deletions
diff --git a/src/test/ui/error-codes/E0010-teach.rs b/src/test/ui/error-codes/E0010-teach.rs
index da51035ab55..fc5dffb37cf 100644
--- a/src/test/ui/error-codes/E0010-teach.rs
+++ b/src/test/ui/error-codes/E0010-teach.rs
@@ -4,6 +4,5 @@
 #![allow(warnings)]
 
 const CON : Box<i32> = box 0; //~ ERROR E0010
-//~^ ERROR constant contains unimplemented expression type
 
 fn main() {}
diff --git a/src/test/ui/error-codes/E0010-teach.stderr b/src/test/ui/error-codes/E0010-teach.stderr
index c15ab5c655a..33de9fd685e 100644
--- a/src/test/ui/error-codes/E0010-teach.stderr
+++ b/src/test/ui/error-codes/E0010-teach.stderr
@@ -6,17 +6,6 @@ LL | const CON : Box<i32> = box 0;
    |
    = note: The value of statics and constants must be known at compile time, and they live for the entire lifetime of a program. Creating a boxed value allocates memory on the heap at runtime, and therefore cannot be done at compile time.
 
-error[E0019]: constant contains unimplemented expression type
-  --> $DIR/E0010-teach.rs:6:28
-   |
-LL | const CON : Box<i32> = box 0;
-   |                            ^
-   |
-   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
-   = note: A function call isn't allowed in the const's initialization expression because the expression's value must be known at compile-time.
-   = note: Remember: you can't use a function call inside a const's initialization expression! However, you can use it anywhere else.
-
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
-Some errors have detailed explanations: E0010, E0019.
-For more information about an error, try `rustc --explain E0010`.
+For more information about this error, try `rustc --explain E0010`.
diff --git a/src/test/ui/error-codes/E0010.rs b/src/test/ui/error-codes/E0010.rs
index 3398e2c28ba..e62997640f4 100644
--- a/src/test/ui/error-codes/E0010.rs
+++ b/src/test/ui/error-codes/E0010.rs
@@ -2,6 +2,5 @@
 #![allow(warnings)]
 
 const CON : Box<i32> = box 0; //~ ERROR E0010
-//~^ ERROR constant contains unimplemented expression type
 
 fn main() {}
diff --git a/src/test/ui/error-codes/E0010.stderr b/src/test/ui/error-codes/E0010.stderr
index f49fb9c4632..0042333b98a 100644
--- a/src/test/ui/error-codes/E0010.stderr
+++ b/src/test/ui/error-codes/E0010.stderr
@@ -4,15 +4,6 @@ error[E0010]: allocations are not allowed in constants
 LL | const CON : Box<i32> = box 0;
    |                        ^^^^^ allocation not allowed in constants
 
-error[E0019]: constant contains unimplemented expression type
-  --> $DIR/E0010.rs:4:28
-   |
-LL | const CON : Box<i32> = box 0;
-   |                            ^
-   |
-   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
-
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
-Some errors have detailed explanations: E0010, E0019.
-For more information about an error, try `rustc --explain E0010`.
+For more information about this error, try `rustc --explain E0010`.
diff --git a/src/test/ui/error-codes/E0017.rs b/src/test/ui/error-codes/E0017.rs
index 54d3cc54a84..262f7bc72c7 100644
--- a/src/test/ui/error-codes/E0017.rs
+++ b/src/test/ui/error-codes/E0017.rs
@@ -5,8 +5,8 @@ static mut M: i32 = 3;
 const CR: &'static mut i32 = &mut C; //~ ERROR E0764
                                      //~| WARN taking a mutable
 static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0764
-                                              //~| ERROR E0019
                                               //~| ERROR cannot borrow
+
 static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0764
                                               //~| WARN taking a mutable
 static STATIC_MUT_REF: &'static mut i32 = unsafe { &mut M }; //~ ERROR E0764
diff --git a/src/test/ui/error-codes/E0017.stderr b/src/test/ui/error-codes/E0017.stderr
index 40ef6bd97b3..ea591587e6d 100644
--- a/src/test/ui/error-codes/E0017.stderr
+++ b/src/test/ui/error-codes/E0017.stderr
@@ -19,14 +19,6 @@ error[E0764]: mutable references are not allowed in constants
 LL | const CR: &'static mut i32 = &mut C;
    |                              ^^^^^^ `&mut` is only allowed in `const fn`
 
-error[E0019]: static contains unimplemented expression type
-  --> $DIR/E0017.rs:7:39
-   |
-LL | static STATIC_REF: &'static mut i32 = &mut X;
-   |                                       ^^^^^^
-   |
-   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
-
 error[E0764]: mutable references are not allowed in statics
   --> $DIR/E0017.rs:7:39
    |
@@ -65,7 +57,7 @@ error[E0764]: mutable references are not allowed in statics
 LL | static STATIC_MUT_REF: &'static mut i32 = unsafe { &mut M };
    |                                                    ^^^^^^ `&mut` is only allowed in `const fn`
 
-error: aborting due to 6 previous errors; 2 warnings emitted
+error: aborting due to 5 previous errors; 2 warnings emitted
 
-Some errors have detailed explanations: E0019, E0596, E0764.
-For more information about an error, try `rustc --explain E0019`.
+Some errors have detailed explanations: E0596, E0764.
+For more information about an error, try `rustc --explain E0596`.
diff --git a/src/test/ui/error-codes/E0388.rs b/src/test/ui/error-codes/E0388.rs
index 8ad586bb30f..bb0c4979b9a 100644
--- a/src/test/ui/error-codes/E0388.rs
+++ b/src/test/ui/error-codes/E0388.rs
@@ -3,9 +3,9 @@ const C: i32 = 2;
 
 const CR: &'static mut i32 = &mut C; //~ ERROR E0764
                                      //~| WARN taking a mutable
-static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0019
-                                              //~| ERROR cannot borrow
+static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR cannot borrow
                                               //~| ERROR E0764
+
 static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0764
                                              //~| WARN taking a mutable
 
diff --git a/src/test/ui/error-codes/E0388.stderr b/src/test/ui/error-codes/E0388.stderr
index 39bc717ceec..73e0b139cd0 100644
--- a/src/test/ui/error-codes/E0388.stderr
+++ b/src/test/ui/error-codes/E0388.stderr
@@ -19,14 +19,6 @@ error[E0764]: mutable references are not allowed in constants
 LL | const CR: &'static mut i32 = &mut C;
    |                              ^^^^^^ `&mut` is only allowed in `const fn`
 
-error[E0019]: static contains unimplemented expression type
-  --> $DIR/E0388.rs:6:39
-   |
-LL | static STATIC_REF: &'static mut i32 = &mut X;
-   |                                       ^^^^^^
-   |
-   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
-
 error[E0764]: mutable references are not allowed in statics
   --> $DIR/E0388.rs:6:39
    |
@@ -59,7 +51,7 @@ error[E0764]: mutable references are not allowed in statics
 LL | static CONST_REF: &'static mut i32 = &mut C;
    |                                      ^^^^^^ `&mut` is only allowed in `const fn`
 
-error: aborting due to 5 previous errors; 2 warnings emitted
+error: aborting due to 4 previous errors; 2 warnings emitted
 
-Some errors have detailed explanations: E0019, E0596, E0764.
-For more information about an error, try `rustc --explain E0019`.
+Some errors have detailed explanations: E0596, E0764.
+For more information about an error, try `rustc --explain E0596`.