]> git.lizzy.rs Git - rust.git/commitdiff
Bless tests
authorDylan MacKenzie <ecstaticmorse@gmail.com>
Thu, 24 Sep 2020 04:05:59 +0000 (21:05 -0700)
committerDylan MacKenzie <ecstaticmorse@gmail.com>
Thu, 24 Sep 2020 04:05:59 +0000 (21:05 -0700)
src/test/ui/consts/const-mut-refs/feature-gate-const_mut_refs.rs
src/test/ui/consts/const-mut-refs/feature-gate-const_mut_refs.stderr
src/test/ui/consts/const_let_assign3.stderr
src/test/ui/consts/min_const_fn/min_const_fn.rs
src/test/ui/consts/min_const_fn/min_const_fn.stderr
src/test/ui/consts/min_const_fn/mutable_borrow.rs
src/test/ui/consts/min_const_fn/mutable_borrow.stderr
src/test/ui/unsafe/ranged_ints2_const.stderr

index f31543af590d66c05e02788aba08d349687af5b6..ce9be4ac5c2af5abfb35ad62c70f058e5e96074c 100644 (file)
@@ -2,7 +2,7 @@ fn main() {
     foo(&mut 5);
 }
 
-const fn foo(x: &mut i32) -> i32 { //~ ERROR mutable references in const fn
+const fn foo(x: &mut i32) -> i32 { //~ ERROR mutable references
     *x + 1
 
 }
index 83e050c7a5c8aee45c04370ed3249865f4565877..3f9bd37053a0ebca11af6ebf5779dff881c1df3a 100644 (file)
@@ -1,12 +1,12 @@
-error[E0723]: mutable references in const fn are unstable
+error[E0658]: mutable references are not allowed in constant functions
   --> $DIR/feature-gate-const_mut_refs.rs:5:14
    |
 LL | const fn foo(x: &mut i32) -> i32 {
    |              ^
    |
-   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
-   = help: add `#![feature(const_fn)]` to the crate attributes to enable
+   = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
+   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0723`.
+For more information about this error, try `rustc --explain E0658`.
index 785d9c8c2a5fb7fbf263474c32b5b3dac3f0043f..15badea003736ebd785215dd2553f193fcc8cc16 100644 (file)
@@ -1,11 +1,11 @@
-error[E0723]: mutable references in const fn are unstable
+error[E0658]: mutable references are not allowed in constant functions
   --> $DIR/const_let_assign3.rs:8:18
    |
 LL |     const fn foo(&mut self, x: u32) {
    |                  ^^^^^^^^^
    |
-   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
-   = help: add `#![feature(const_fn)]` to the crate attributes to enable
+   = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
+   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
 
 error[E0764]: mutable references are not allowed in constants
   --> $DIR/const_let_assign3.rs:16:5
@@ -29,5 +29,5 @@ LL |     *y = 42;
 
 error: aborting due to 4 previous errors
 
-Some errors have detailed explanations: E0019, E0723, E0764.
+Some errors have detailed explanations: E0019, E0658, E0764.
 For more information about an error, try `rustc --explain E0019`.
index 5dd70acb6ff1c6cec1e013dbd5d32da6cc93fc61..336d754b06a735472df01db6c7cbec586d085458 100644 (file)
@@ -37,26 +37,26 @@ const fn new(t: T) -> Self { Foo(t) }
     const fn into_inner(self) -> T { self.0 } //~ destructors cannot be evaluated
     const fn get(&self) -> &T { &self.0 }
     const fn get_mut(&mut self) -> &mut T { &mut self.0 }
-    //~^ mutable references in const fn are unstable
+    //~^ mutable references
 }
 impl<'a, T> Foo<T> {
     const fn new_lt(t: T) -> Self { Foo(t) }
     const fn into_inner_lt(self) -> T { self.0 } //~ destructors cannot be evaluated
     const fn get_lt(&'a self) -> &T { &self.0 }
     const fn get_mut_lt(&'a mut self) -> &mut T { &mut self.0 }
-    //~^ mutable references in const fn are unstable
+    //~^ mutable references
 }
 impl<T: Sized> Foo<T> {
     const fn new_s(t: T) -> Self { Foo(t) }
     const fn into_inner_s(self) -> T { self.0 } //~ ERROR destructors
     const fn get_s(&self) -> &T { &self.0 }
     const fn get_mut_s(&mut self) -> &mut T { &mut self.0 }
-    //~^ mutable references in const fn are unstable
+    //~^ mutable references
 }
 impl<T: ?Sized> Foo<T> {
     const fn get_sq(&self) -> &T { &self.0 }
     const fn get_mut_sq(&mut self) -> &mut T { &mut self.0 }
-    //~^ mutable references in const fn are unstable
+    //~^ mutable references
 }
 
 
@@ -99,7 +99,7 @@ const fn foo30_2_with_unsafe(x: *mut u32) -> usize { unsafe { x as usize } }
 //~^ ERROR casting pointers to integers
 const fn foo30_6() -> bool { let x = true; x }
 const fn inc(x: &mut i32) { *x += 1 }
-//~^ ERROR mutable references in const fn are unstable
+//~^ ERROR mutable references
 
 // ok
 const fn foo36(a: bool, b: bool) -> bool { a && b }
index d4498f061c64bf71ca1ff6c9bef611fbf40bd826..c96500e38ec83de39d413bb6075c8994dfec5ae9 100644 (file)
@@ -6,14 +6,14 @@ LL |     const fn into_inner(self) -> T { self.0 }
    |                         |
    |                         constant functions cannot evaluate destructors
 
-error[E0723]: mutable references in const fn are unstable
+error[E0658]: mutable references are not allowed in constant functions
   --> $DIR/min_const_fn.rs:39:36
    |
 LL |     const fn get_mut(&mut self) -> &mut T { &mut self.0 }
    |                                    ^^^^^^
    |
-   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
-   = help: add `#![feature(const_fn)]` to the crate attributes to enable
+   = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
+   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
 
 error[E0493]: destructors cannot be evaluated at compile-time
   --> $DIR/min_const_fn.rs:44:28
@@ -23,14 +23,14 @@ LL |     const fn into_inner_lt(self) -> T { self.0 }
    |                            |
    |                            constant functions cannot evaluate destructors
 
-error[E0723]: mutable references in const fn are unstable
+error[E0658]: mutable references are not allowed in constant functions
   --> $DIR/min_const_fn.rs:46:42
    |
 LL |     const fn get_mut_lt(&'a mut self) -> &mut T { &mut self.0 }
    |                                          ^^^^^^
    |
-   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
-   = help: add `#![feature(const_fn)]` to the crate attributes to enable
+   = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
+   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
 
 error[E0493]: destructors cannot be evaluated at compile-time
   --> $DIR/min_const_fn.rs:51:27
@@ -40,23 +40,23 @@ LL |     const fn into_inner_s(self) -> T { self.0 }
    |                           |
    |                           constant functions cannot evaluate destructors
 
-error[E0723]: mutable references in const fn are unstable
+error[E0658]: mutable references are not allowed in constant functions
   --> $DIR/min_const_fn.rs:53:38
    |
 LL |     const fn get_mut_s(&mut self) -> &mut T { &mut self.0 }
    |                                      ^^^^^^
    |
-   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
-   = help: add `#![feature(const_fn)]` to the crate attributes to enable
+   = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
+   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
 
-error[E0723]: mutable references in const fn are unstable
+error[E0658]: mutable references are not allowed in constant functions
   --> $DIR/min_const_fn.rs:58:39
    |
 LL |     const fn get_mut_sq(&mut self) -> &mut T { &mut self.0 }
    |                                       ^^^^^^
    |
-   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
-   = help: add `#![feature(const_fn)]` to the crate attributes to enable
+   = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
+   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
 
 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
   --> $DIR/min_const_fn.rs:76:16
@@ -164,14 +164,14 @@ LL | const fn foo30_2_with_unsafe(x: *mut u32) -> usize { unsafe { x as usize }
    = note: see issue #51910 <https://github.com/rust-lang/rust/issues/51910> for more information
    = help: add `#![feature(const_raw_ptr_to_usize_cast)]` to the crate attributes to enable
 
-error[E0723]: mutable references in const fn are unstable
+error[E0658]: mutable references are not allowed in constant functions
   --> $DIR/min_const_fn.rs:101:14
    |
 LL | const fn inc(x: &mut i32) { *x += 1 }
    |              ^
    |
-   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
-   = help: add `#![feature(const_fn)]` to the crate attributes to enable
+   = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
+   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
 
 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
   --> $DIR/min_const_fn.rs:110:6
index 89acfea6ed8ff8d60ae13bdc63c8602ef235fdf3..580b1d50f774e4923825905e2d8c7cf66dedfbe5 100644 (file)
@@ -1,6 +1,6 @@
 const fn mutable_ref_in_const() -> u8 {
     let mut a = 0;
-    let b = &mut a; //~ ERROR mutable references in const fn
+    let b = &mut a; //~ ERROR mutable references
     *b
 }
 
@@ -9,7 +9,7 @@ const fn mutable_ref_in_const() -> u8 {
 impl X {
     const fn inherent_mutable_ref_in_const() -> u8 {
         let mut a = 0;
-        let b = &mut a; //~ ERROR mutable references in const fn
+        let b = &mut a; //~ ERROR mutable references
         *b
     }
 }
index f5a3c168a86d7c06a2d14fde938b0213e69592d7..4e5cdbb18aae3649c117018539ef957de66d4d5c 100644 (file)
@@ -1,21 +1,21 @@
-error[E0723]: mutable references in const fn are unstable
+error[E0658]: mutable references are not allowed in constant functions
   --> $DIR/mutable_borrow.rs:3:9
    |
 LL |     let b = &mut a;
    |         ^
    |
-   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
-   = help: add `#![feature(const_fn)]` to the crate attributes to enable
+   = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
+   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
 
-error[E0723]: mutable references in const fn are unstable
+error[E0658]: mutable references are not allowed in constant functions
   --> $DIR/mutable_borrow.rs:12:13
    |
 LL |         let b = &mut a;
    |             ^
    |
-   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
-   = help: add `#![feature(const_fn)]` to the crate attributes to enable
+   = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
+   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
 
 error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0723`.
+For more information about this error, try `rustc --explain E0658`.
index d508d07791de9e3ddee835ac876e95f453fc70a4..1a6bcd36ee15719dadc460080cb48307913a9385 100644 (file)
@@ -1,20 +1,20 @@
-error[E0723]: mutable references in const fn are unstable
+error[E0658]: mutable references are not allowed in constant functions
   --> $DIR/ranged_ints2_const.rs:11:9
    |
 LL |     let y = &mut x.0;
    |         ^
    |
-   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
-   = help: add `#![feature(const_fn)]` to the crate attributes to enable
+   = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
+   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
 
-error[E0723]: mutable references in const fn are unstable
+error[E0658]: mutable references are not allowed in constant functions
   --> $DIR/ranged_ints2_const.rs:18:9
    |
 LL |     let y = unsafe { &mut x.0 };
    |         ^
    |
-   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
-   = help: add `#![feature(const_fn)]` to the crate attributes to enable
+   = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
+   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
 
 error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
   --> $DIR/ranged_ints2_const.rs:11:13
@@ -26,5 +26,5 @@ LL |     let y = &mut x.0;
 
 error: aborting due to 3 previous errors
 
-Some errors have detailed explanations: E0133, E0723.
+Some errors have detailed explanations: E0133, E0658.
 For more information about an error, try `rustc --explain E0133`.