]> git.lizzy.rs Git - rust.git/commitdiff
Update tests after pretty printing
authorvarkor <github@varkor.com>
Sat, 25 May 2019 19:42:14 +0000 (20:42 +0100)
committervarkor <github@varkor.com>
Tue, 28 May 2019 20:35:20 +0000 (21:35 +0100)
src/test/ui/const-generics/broken-mir-2.rs
src/test/ui/const-generics/broken-mir-2.stderr
src/test/ui/const-generics/cannot-infer-type-for-const-param.stderr
src/test/ui/consts/const-array-oob-arith.stderr

index 2c93ed0defdfe65a253357e5eca4d8f0c34c126d..fb9a63ea738fa8767a768be2ec300bc50bb336a4 100644 (file)
@@ -4,6 +4,6 @@
 use std::fmt::Debug;
 
 #[derive(Debug)]
-struct S<T: Debug, const N: usize>([T; N]); //~ ERROR `[T; N]` doesn't implement `std::fmt::Debug`
+struct S<T: Debug, const N: usize>([T; N]); //~ ERROR `[T; _]` doesn't implement `std::fmt::Debug`
 
 fn main() {}
index 162153573a1150b86ca682f45af7f88b31687ed1..fb9b88bde0a259ebc88e6822c61740b98d1d5b90 100644 (file)
@@ -4,14 +4,14 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
 
-error[E0277]: `[T; N]` doesn't implement `std::fmt::Debug`
+error[E0277]: `[T; _]` doesn't implement `std::fmt::Debug`
   --> $DIR/broken-mir-2.rs:7:36
    |
 LL | struct S<T: Debug, const N: usize>([T; N]);
-   |                                    ^^^^^^ `[T; N]` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
+   |                                    ^^^^^^ `[T; _]` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
    |
-   = help: the trait `std::fmt::Debug` is not implemented for `[T; N]`
-   = note: required because of the requirements on the impl of `std::fmt::Debug` for `&[T; N]`
+   = help: the trait `std::fmt::Debug` is not implemented for `[T; _]`
+   = note: required because of the requirements on the impl of `std::fmt::Debug` for `&[T; _]`
    = note: required for the cast to the object type `dyn std::fmt::Debug`
 
 error: aborting due to previous error
index 1b5d9b173de14729ae85643ca9b9dbcfab221cea..094bdbf486ce5075d88c1c6711d4e1ba440f6c75 100644 (file)
@@ -14,7 +14,7 @@ error[E0308]: mismatched types
   --> $DIR/cannot-infer-type-for-const-param.rs:10:22
    |
 LL |     let _ = Foo::<3>([1, 2, 3]);
-   |                      ^^^^^^^^^ expected `Const { ty: usize, val: Unevaluated(DefId(0:18 ~ cannot_infer_type_for_const_param[317d]::main[0]::{{constant}}[0]), []) }`, found `Const { ty: usize, val: Scalar(Bits { size: 8, bits: 3 }) }`
+   |                      ^^^^^^^^^ expected `Const { ty: usize, val: Unevaluated(DefId(0:18 ~ cannot_infer_type_for_const_param[317d]::main[0]::{{constant}}[0]), []) }`, found `Const { ty: usize, val: Scalar(0x0000000000000003) }`
    |
    = note: expected type `[u8; _]`
               found type `[u8; 3]`
index 29297b24e988f774f171b919c0791827d77a46ff..745d59040410bb31087b7b81fbca0752de117b07 100644 (file)
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/const-array-oob-arith.rs:7:45
    |
 LL | const BLUB: [i32; (ARR[0] - 40) as usize] = [5];
-   |                                             ^^^ expected `Const { ty: usize, val: Scalar(Bits { size: 8, bits: 2 }) }`, found `Const { ty: usize, val: Scalar(Bits { size: 8, bits: 1 }) }`
+   |                                             ^^^ expected `Const { ty: usize, val: Scalar(0x0000000000000002) }`, found `Const { ty: usize, val: Scalar(0x0000000000000001) }`
    |
    = note: expected type `[i32; 2]`
               found type `[i32; 1]`
@@ -11,7 +11,7 @@ error[E0308]: mismatched types
   --> $DIR/const-array-oob-arith.rs:8:44
    |
 LL | const BOO: [i32; (ARR[0] - 41) as usize] = [5, 99];
-   |                                            ^^^^^^^ expected `Const { ty: usize, val: Scalar(Bits { size: 8, bits: 1 }) }`, found `Const { ty: usize, val: Scalar(Bits { size: 8, bits: 2 }) }`
+   |                                            ^^^^^^^ expected `Const { ty: usize, val: Scalar(0x0000000000000001) }`, found `Const { ty: usize, val: Scalar(0x0000000000000002) }`
    |
    = note: expected type `[i32; 1]`
               found type `[i32; 2]`