Skip to content

Commit

Permalink
bless tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnr committed Sep 21, 2020
1 parent 30cbc97 commit 7a02ebd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
Expand Up @@ -4,8 +4,8 @@
// We do not yet want to support let-bindings in abstract consts,
// so this test should keep failing for now.
fn test<const N: usize>() -> [u8; { let x = N; N + 1 }] where [u8; { let x = N; N + 1 }]: Default {
//~^ ERROR constant expression depends
//~| ERROR constant expression depends
//~^ ERROR overly complex generic constant
//~| ERROR overly complex generic constant
Default::default()
}

Expand Down
@@ -1,18 +1,28 @@
error: constant expression depends on a generic parameter
--> $DIR/let-bindings.rs:6:91
error: overly complex generic constant
--> $DIR/let-bindings.rs:6:68
|
LL | fn test<const N: usize>() -> [u8; { let x = N; N + 1 }] where [u8; { let x = N; N + 1 }]: Default {
| ^^^^^^^ required by this bound in `test::{{constant}}#0`
| ^^^^^^^^^^^^^^^^^^^^
|
= note: this may fail depending on what value the parameter takes
note: unsupported statement
--> $DIR/let-bindings.rs:6:74
|
LL | fn test<const N: usize>() -> [u8; { let x = N; N + 1 }] where [u8; { let x = N; N + 1 }]: Default {
| ^
= help: consider moving this anonymous constant into a `const` function

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

error: aborting due to 2 previous errors

0 comments on commit 7a02ebd

Please sign in to comment.