Skip to content

Commit 7a02ebd

Browse files
committed
bless tests
1 parent 30cbc97 commit 7a02ebd

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

src/test/ui/const-generics/const_evaluatable_checked/let-bindings.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
// We do not yet want to support let-bindings in abstract consts,
55
// so this test should keep failing for now.
66
fn test<const N: usize>() -> [u8; { let x = N; N + 1 }] where [u8; { let x = N; N + 1 }]: Default {
7-
//~^ ERROR constant expression depends
8-
//~| ERROR constant expression depends
7+
//~^ ERROR overly complex generic constant
8+
//~| ERROR overly complex generic constant
99
Default::default()
1010
}
1111

Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
1-
error: constant expression depends on a generic parameter
2-
--> $DIR/let-bindings.rs:6:91
1+
error: overly complex generic constant
2+
--> $DIR/let-bindings.rs:6:68
33
|
44
LL | fn test<const N: usize>() -> [u8; { let x = N; N + 1 }] where [u8; { let x = N; N + 1 }]: Default {
5-
| ^^^^^^^ required by this bound in `test::{{constant}}#0`
5+
| ^^^^^^^^^^^^^^^^^^^^
66
|
7-
= note: this may fail depending on what value the parameter takes
7+
note: unsupported statement
8+
--> $DIR/let-bindings.rs:6:74
9+
|
10+
LL | fn test<const N: usize>() -> [u8; { let x = N; N + 1 }] where [u8; { let x = N; N + 1 }]: Default {
11+
| ^
12+
= help: consider moving this anonymous constant into a `const` function
813

9-
error: constant expression depends on a generic parameter
10-
--> $DIR/let-bindings.rs:6:30
14+
error: overly complex generic constant
15+
--> $DIR/let-bindings.rs:6:35
1116
|
1217
LL | fn test<const N: usize>() -> [u8; { let x = N; N + 1 }] where [u8; { let x = N; N + 1 }]: Default {
13-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
18+
| ^^^^^^^^^^^^^^^^^^^^
1419
|
15-
= note: this may fail depending on what value the parameter takes
20+
note: unsupported statement
21+
--> $DIR/let-bindings.rs:6:41
22+
|
23+
LL | fn test<const N: usize>() -> [u8; { let x = N; N + 1 }] where [u8; { let x = N; N + 1 }]: Default {
24+
| ^
25+
= help: consider moving this anonymous constant into a `const` function
1626

1727
error: aborting due to 2 previous errors
1828

0 commit comments

Comments
 (0)