diff options
| author | Michael Goulet <michael@errs.io> | 2025-05-01 18:52:41 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-05-05 14:27:09 +0000 |
| commit | 45598de7048f350f48651b67b4dfc4dfcb30deeb (patch) | |
| tree | 09be8c544e7b5f7352f195cb180150a480d2bb8f /tests/ui/const-generics/generic_const_exprs | |
| parent | 0eb0b8cb67ff2c37eab775eaac6b330347e5c97f (diff) | |
| download | rust-45598de7048f350f48651b67b4dfc4dfcb30deeb.tar.gz rust-45598de7048f350f48651b67b4dfc4dfcb30deeb.zip | |
Do not gather local all together at the beginning of typeck
Diffstat (limited to 'tests/ui/const-generics/generic_const_exprs')
| -rw-r--r-- | tests/ui/const-generics/generic_const_exprs/dependence_lint.gce.stderr | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/tests/ui/const-generics/generic_const_exprs/dependence_lint.gce.stderr b/tests/ui/const-generics/generic_const_exprs/dependence_lint.gce.stderr index 7e318f8786f..f6119c17bf4 100644 --- a/tests/ui/const-generics/generic_const_exprs/dependence_lint.gce.stderr +++ b/tests/ui/const-generics/generic_const_exprs/dependence_lint.gce.stderr @@ -1,27 +1,27 @@ -error: overly complex generic constant - --> $DIR/dependence_lint.rs:21:17 - | -LL | let _: [u8; if true { size_of::<T>() } else { 3 }]; // error on stable, error with gce - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ control flow is not supported in generic constants - | - = help: consider moving this anonymous constant into a `const` function - error: unconstrained generic constant - --> $DIR/dependence_lint.rs:14:12 + --> $DIR/dependence_lint.rs:10:9 | -LL | let _: [u8; size_of::<*mut T>()]; // error on stable, error with gce - | ^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | [0; size_of::<*mut T>()]; // lint on stable, error with `generic_const_exprs` + | ^^^^^^^^^^^^^^^^^^^ | help: try adding a `where` bound | LL | fn foo<T>() where [(); size_of::<*mut T>()]: { | ++++++++++++++++++++++++++++++++ +error: overly complex generic constant + --> $DIR/dependence_lint.rs:17:9 + | +LL | [0; if false { size_of::<T>() } else { 3 }]; // lint on stable, error with gce + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ control flow is not supported in generic constants + | + = help: consider moving this anonymous constant into a `const` function + error: unconstrained generic constant - --> $DIR/dependence_lint.rs:10:9 + --> $DIR/dependence_lint.rs:14:12 | -LL | [0; size_of::<*mut T>()]; // lint on stable, error with `generic_const_exprs` - | ^^^^^^^^^^^^^^^^^^^ +LL | let _: [u8; size_of::<*mut T>()]; // error on stable, error with gce + | ^^^^^^^^^^^^^^^^^^^^^^^^^ | help: try adding a `where` bound | @@ -29,10 +29,10 @@ LL | fn foo<T>() where [(); size_of::<*mut T>()]: { | ++++++++++++++++++++++++++++++++ error: overly complex generic constant - --> $DIR/dependence_lint.rs:17:9 + --> $DIR/dependence_lint.rs:21:17 | -LL | [0; if false { size_of::<T>() } else { 3 }]; // lint on stable, error with gce - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ control flow is not supported in generic constants +LL | let _: [u8; if true { size_of::<T>() } else { 3 }]; // error on stable, error with gce + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ control flow is not supported in generic constants | = help: consider moving this anonymous constant into a `const` function |
