Skip to content

Commit f865b7d

Browse files
committed
Update tests after pretty printing
1 parent cfa1f80 commit f865b7d

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/test/ui/const-generics/broken-mir-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
use std::fmt::Debug;
55

66
#[derive(Debug)]
7-
struct S<T: Debug, const N: usize>([T; N]); //~ ERROR `[T; N]` doesn't implement `std::fmt::Debug`
7+
struct S<T: Debug, const N: usize>([T; N]); //~ ERROR `[T; _]` doesn't implement `std::fmt::Debug`
88

99
fn main() {}

src/test/ui/const-generics/broken-mir-2.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
44
LL | #![feature(const_generics)]
55
| ^^^^^^^^^^^^^^
66

7-
error[E0277]: `[T; N]` doesn't implement `std::fmt::Debug`
7+
error[E0277]: `[T; _]` doesn't implement `std::fmt::Debug`
88
--> $DIR/broken-mir-2.rs:7:36
99
|
1010
LL | struct S<T: Debug, const N: usize>([T; N]);
11-
| ^^^^^^ `[T; N]` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
11+
| ^^^^^^ `[T; _]` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
1212
|
13-
= help: the trait `std::fmt::Debug` is not implemented for `[T; N]`
14-
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&[T; N]`
13+
= help: the trait `std::fmt::Debug` is not implemented for `[T; _]`
14+
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&[T; _]`
1515
= note: required for the cast to the object type `dyn std::fmt::Debug`
1616

1717
error: aborting due to previous error

src/test/ui/const-generics/cannot-infer-type-for-const-param.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ error[E0308]: mismatched types
1414
--> $DIR/cannot-infer-type-for-const-param.rs:10:22
1515
|
1616
LL | let _ = Foo::<3>([1, 2, 3]);
17-
| ^^^^^^^^^ 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 }) }`
17+
| ^^^^^^^^^ 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) }`
1818
|
1919
= note: expected type `[u8; _]`
2020
found type `[u8; 3]`

src/test/ui/consts/const-array-oob-arith.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
22
--> $DIR/const-array-oob-arith.rs:7:45
33
|
44
LL | const BLUB: [i32; (ARR[0] - 40) as usize] = [5];
5-
| ^^^ expected `Const { ty: usize, val: Scalar(Bits { size: 8, bits: 2 }) }`, found `Const { ty: usize, val: Scalar(Bits { size: 8, bits: 1 }) }`
5+
| ^^^ expected `Const { ty: usize, val: Scalar(0x0000000000000002) }`, found `Const { ty: usize, val: Scalar(0x0000000000000001) }`
66
|
77
= note: expected type `[i32; 2]`
88
found type `[i32; 1]`
@@ -11,7 +11,7 @@ error[E0308]: mismatched types
1111
--> $DIR/const-array-oob-arith.rs:8:44
1212
|
1313
LL | const BOO: [i32; (ARR[0] - 41) as usize] = [5, 99];
14-
| ^^^^^^^ expected `Const { ty: usize, val: Scalar(Bits { size: 8, bits: 1 }) }`, found `Const { ty: usize, val: Scalar(Bits { size: 8, bits: 2 }) }`
14+
| ^^^^^^^ expected `Const { ty: usize, val: Scalar(0x0000000000000001) }`, found `Const { ty: usize, val: Scalar(0x0000000000000002) }`
1515
|
1616
= note: expected type `[i32; 1]`
1717
found type `[i32; 2]`

0 commit comments

Comments
 (0)