From 98ab898d30f0914aa9bc0c3864dc059d45c2c7fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Fri, 15 Nov 2024 18:49:43 +0100 Subject: [PATCH] tests: ui/inline-consts: add issue number to a test, rename other tests from a_b_c to a-b-c --- ...liveness.rs => const-block-pat-liveness.rs} | 0 ...w.rs => cross-const-control-flow-125846.rs} | 0 ... => cross-const-control-flow-125846.stderr} | 18 +++++++++--------- ...ables.rs => referencing-local-variables.rs} | 0 ...derr => referencing-local-variables.stderr} | 2 +- .../{uninit_local.rs => uninit-local.rs} | 0 ...uninit_local.stderr => uninit-local.stderr} | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) rename tests/ui/inline-const/{const_block_pat_liveness.rs => const-block-pat-liveness.rs} (100%) rename tests/ui/inline-const/{cross_const_control_flow.rs => cross-const-control-flow-125846.rs} (100%) rename tests/ui/inline-const/{cross_const_control_flow.stderr => cross-const-control-flow-125846.stderr} (82%) rename tests/ui/inline-const/{referencing_local_variables.rs => referencing-local-variables.rs} (100%) rename tests/ui/inline-const/{referencing_local_variables.stderr => referencing-local-variables.stderr} (87%) rename tests/ui/inline-const/{uninit_local.rs => uninit-local.rs} (100%) rename tests/ui/inline-const/{uninit_local.stderr => uninit-local.stderr} (93%) diff --git a/tests/ui/inline-const/const_block_pat_liveness.rs b/tests/ui/inline-const/const-block-pat-liveness.rs similarity index 100% rename from tests/ui/inline-const/const_block_pat_liveness.rs rename to tests/ui/inline-const/const-block-pat-liveness.rs diff --git a/tests/ui/inline-const/cross_const_control_flow.rs b/tests/ui/inline-const/cross-const-control-flow-125846.rs similarity index 100% rename from tests/ui/inline-const/cross_const_control_flow.rs rename to tests/ui/inline-const/cross-const-control-flow-125846.rs diff --git a/tests/ui/inline-const/cross_const_control_flow.stderr b/tests/ui/inline-const/cross-const-control-flow-125846.stderr similarity index 82% rename from tests/ui/inline-const/cross_const_control_flow.stderr rename to tests/ui/inline-const/cross-const-control-flow-125846.stderr index ecfa921edd2..4aa1c273504 100644 --- a/tests/ui/inline-const/cross_const_control_flow.stderr +++ b/tests/ui/inline-const/cross-const-control-flow-125846.stderr @@ -1,5 +1,5 @@ error[E0767]: use of unreachable label `'a` - --> $DIR/cross_const_control_flow.rs:9:25 + --> $DIR/cross-const-control-flow-125846.rs:9:25 | LL | 'a: { const { break 'a } } | -- ^^ unreachable label `'a` @@ -9,7 +9,7 @@ LL | 'a: { const { break 'a } } = note: labels are unreachable through functions, closures, async blocks and modules error[E0767]: use of unreachable label `'a` - --> $DIR/cross_const_control_flow.rs:22:28 + --> $DIR/cross-const-control-flow-125846.rs:22:28 | LL | 'a: { const { continue 'a } } | -- ^^ unreachable label `'a` @@ -19,7 +19,7 @@ LL | 'a: { const { continue 'a } } = note: labels are unreachable through functions, closures, async blocks and modules error[E0435]: attempt to use a non-constant value in a constant - --> $DIR/cross_const_control_flow.rs:41:14 + --> $DIR/cross-const-control-flow-125846.rs:41:14 | LL | const { &x }; | ^ non-constant value @@ -30,7 +30,7 @@ LL | const x: /* Type */ = 1; | ~~~~~ ++++++++++++ error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/cross_const_control_flow.rs:35:22 + --> $DIR/cross-const-control-flow-125846.rs:35:22 | LL | const { async {}.await } | -----------^^^^^-- @@ -39,31 +39,31 @@ LL | const { async {}.await } | this is not `async` error[E0268]: `break` outside of a loop or labeled block - --> $DIR/cross_const_control_flow.rs:9:19 + --> $DIR/cross-const-control-flow-125846.rs:9:19 | LL | 'a: { const { break 'a } } | ^^^^^^^^ cannot `break` outside of a loop or labeled block error[E0268]: `break` outside of a loop or labeled block - --> $DIR/cross_const_control_flow.rs:16:17 + --> $DIR/cross-const-control-flow-125846.rs:16:17 | LL | const { break } | ^^^^^ cannot `break` outside of a loop or labeled block error[E0268]: `continue` outside of a loop - --> $DIR/cross_const_control_flow.rs:22:19 + --> $DIR/cross-const-control-flow-125846.rs:22:19 | LL | 'a: { const { continue 'a } } | ^^^^^^^^^^^ cannot `continue` outside of a loop error[E0268]: `continue` outside of a loop - --> $DIR/cross_const_control_flow.rs:29:17 + --> $DIR/cross-const-control-flow-125846.rs:29:17 | LL | const { continue } | ^^^^^^^^ cannot `continue` outside of a loop error[E0572]: return statement outside of function body - --> $DIR/cross_const_control_flow.rs:4:13 + --> $DIR/cross-const-control-flow-125846.rs:4:13 | LL | / fn foo() { LL | | const { return } diff --git a/tests/ui/inline-const/referencing_local_variables.rs b/tests/ui/inline-const/referencing-local-variables.rs similarity index 100% rename from tests/ui/inline-const/referencing_local_variables.rs rename to tests/ui/inline-const/referencing-local-variables.rs diff --git a/tests/ui/inline-const/referencing_local_variables.stderr b/tests/ui/inline-const/referencing-local-variables.stderr similarity index 87% rename from tests/ui/inline-const/referencing_local_variables.stderr rename to tests/ui/inline-const/referencing-local-variables.stderr index 4a0a5406602..7e1cecdddcb 100644 --- a/tests/ui/inline-const/referencing_local_variables.stderr +++ b/tests/ui/inline-const/referencing-local-variables.stderr @@ -1,5 +1,5 @@ error[E0435]: attempt to use a non-constant value in a constant - --> $DIR/referencing_local_variables.rs:2:13 + --> $DIR/referencing-local-variables.rs:2:13 | LL | const fn test_me(a: usize) -> usize { | - this would need to be a `const` diff --git a/tests/ui/inline-const/uninit_local.rs b/tests/ui/inline-const/uninit-local.rs similarity index 100% rename from tests/ui/inline-const/uninit_local.rs rename to tests/ui/inline-const/uninit-local.rs diff --git a/tests/ui/inline-const/uninit_local.stderr b/tests/ui/inline-const/uninit-local.stderr similarity index 93% rename from tests/ui/inline-const/uninit_local.stderr rename to tests/ui/inline-const/uninit-local.stderr index 37b78e337e7..fab65ffb5fa 100644 --- a/tests/ui/inline-const/uninit_local.stderr +++ b/tests/ui/inline-const/uninit-local.stderr @@ -1,5 +1,5 @@ error[E0381]: used binding `x` isn't initialized - --> $DIR/uninit_local.rs:4:15 + --> $DIR/uninit-local.rs:4:15 | LL | let x: bool; | - binding declared here but left uninitialized