tests: ui/inline-consts: add issue number to a test, rename other tests from a_b_c to a-b-c

This commit is contained in:
Matthias Krüger 2024-11-15 18:49:43 +01:00
parent 76fd47124b
commit 98ab898d30
7 changed files with 11 additions and 11 deletions

View File

@ -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 }

View File

@ -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<T>(a: usize) -> usize {
| - this would need to be a `const`

View File

@ -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