Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 79351b1

Browse files
committed
Bless expected errors
1 parent facb38d commit 79351b1

File tree

54 files changed

+132
-132
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+132
-132
lines changed

src/test/ui/const-generics/array-size-in-generic-struct-param.min.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
error: generic parameters must not be used inside const evaluations
1+
error: generic parameters may not be used in const operations
22
--> $DIR/array-size-in-generic-struct-param.rs:9:48
33
|
44
LL | struct ArithArrayLen<const N: usize>([u32; 0 + N]);
55
| ^ cannot perform const operation using `N`
66
|
7-
= help: const parameters may only be used as standalone arguments `N`
7+
= help: const parameters may only be used as standalone arguments, i.e. `N`
88

9-
error: generic parameters must not be used inside const evaluations
9+
error: generic parameters may not be used in const operations
1010
--> $DIR/array-size-in-generic-struct-param.rs:20:15
1111
|
1212
LL | arr: [u8; CFG.arr_size],
1313
| ^^^ cannot perform const operation using `CFG`
1414
|
15-
= help: const parameters may only be used as standalone arguments `CFG`
15+
= help: const parameters may only be used as standalone arguments, i.e. `CFG`
1616

1717
error: `Config` is forbidden as the type of a const generic parameter
1818
--> $DIR/array-size-in-generic-struct-param.rs:18:21

src/test/ui/const-generics/array-size-in-generic-struct-param.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#[allow(dead_code)]
99
struct ArithArrayLen<const N: usize>([u32; 0 + N]);
1010
//[full]~^ ERROR constant expression depends on a generic parameter
11-
//[min]~^^ ERROR generic parameters must not be used inside const evaluations
11+
//[min]~^^ ERROR generic parameters may not be used in const operations
1212

1313
#[derive(PartialEq, Eq)]
1414
struct Config {
@@ -19,7 +19,7 @@ struct B<const CFG: Config> {
1919
//[min]~^ ERROR `Config` is forbidden
2020
arr: [u8; CFG.arr_size],
2121
//[full]~^ ERROR constant expression depends on a generic parameter
22-
//[min]~^^ ERROR generic parameters must not be used inside const evaluations
22+
//[min]~^^ ERROR generic parameters may not be used in const operations
2323
}
2424

2525
const C: Config = Config { arr_size: 5 };

src/test/ui/const-generics/const-argument-if-length.min.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error: generic parameters must not be used inside const evaluations
1+
error: generic parameters may not be used in const operations
22
--> $DIR/const-argument-if-length.rs:19:24
33
|
44
LL | pad: [u8; is_zst::<T>()],
55
| ^ cannot perform const operation using `T`
66
|
7-
= note: type parameters may not be used in anonymous constants
7+
= note: type parameters may not be used in const expressions
88

99
error[E0277]: the size for values of type `T` cannot be known at compilation time
1010
--> $DIR/const-argument-if-length.rs:17:12

src/test/ui/const-generics/const-argument-if-length.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub struct AtLeastByte<T: ?Sized> {
1717
value: T,
1818
//~^ ERROR the size for values of type `T` cannot be known at compilation time
1919
pad: [u8; is_zst::<T>()],
20-
//[min]~^ ERROR generic parameters must not be used inside const evaluations
20+
//[min]~^ ERROR generic parameters may not be used in const operations
2121
//[full]~^^ ERROR evaluation of constant value failed
2222
}
2323

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error: generic parameters must not be used inside const evaluations
1+
error: generic parameters may not be used in const operations
22
--> $DIR/feature-gate-const_evaluatable_checked.rs:6:33
33
|
44
LL | type Arr<const N: usize> = [u8; N - 1];
55
| ^ cannot perform const operation using `N`
66
|
7-
= help: const parameters may only be used as standalone arguments `N`
7+
= help: const parameters may only be used as standalone arguments, i.e. `N`
88

99
error: aborting due to previous error
1010

src/test/ui/const-generics/const_evaluatable_checked/feature-gate-const_evaluatable_checked.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#![cfg_attr(min, feature(min_const_generics))]
55

66
type Arr<const N: usize> = [u8; N - 1];
7-
//[min]~^ ERROR generic parameters must not be used inside const evaluations
7+
//[min]~^ ERROR generic parameters may not be used in const operations
88

99
fn test<const N: usize>() -> Arr<N> where Arr<N>: Default {
1010
//[full]~^ ERROR constant expression depends
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
error: generic parameters must not be used inside const evaluations
1+
error: generic parameters may not be used in const operations
22
--> $DIR/simple.rs:8:53
33
|
44
LL | fn test<const N: usize>() -> [u8; N - 1] where [u8; N - 1]: Default {
55
| ^ cannot perform const operation using `N`
66
|
7-
= help: const parameters may only be used as standalone arguments `N`
7+
= help: const parameters may only be used as standalone arguments, i.e. `N`
88

9-
error: generic parameters must not be used inside const evaluations
9+
error: generic parameters may not be used in const operations
1010
--> $DIR/simple.rs:8:35
1111
|
1212
LL | fn test<const N: usize>() -> [u8; N - 1] where [u8; N - 1]: Default {
1313
| ^ cannot perform const operation using `N`
1414
|
15-
= help: const parameters may only be used as standalone arguments `N`
15+
= help: const parameters may only be used as standalone arguments, i.e. `N`
1616

1717
error: aborting due to 2 previous errors
1818

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error: generic parameters must not be used inside const evaluations
1+
error: generic parameters may not be used in const operations
22
--> $DIR/simple_fail.rs:7:33
33
|
44
LL | type Arr<const N: usize> = [u8; N - 1];
55
| ^ cannot perform const operation using `N`
66
|
7-
= help: const parameters may only be used as standalone arguments `N`
7+
= help: const parameters may only be used as standalone arguments, i.e. `N`
88

99
error: aborting due to previous error
1010

src/test/ui/const-generics/const_evaluatable_checked/simple_fail.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#![allow(incomplete_features)]
66

77
type Arr<const N: usize> = [u8; N - 1]; //[full]~ ERROR evaluation of constant
8-
//[min]~^ ERROR generic parameters must not be used inside const evaluations
8+
//[min]~^ ERROR generic parameters may not be used in const operations
99

1010
fn test<const N: usize>() -> Arr<N> where Arr<N>: Sized {
1111
todo!()
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
error: generic parameters must not be used inside const evaluations
1+
error: generic parameters may not be used in const operations
22
--> $DIR/generic-function-call-in-array-length.rs:9:39
33
|
44
LL | fn bar<const N: usize>() -> [u32; foo(N)] {
55
| ^ cannot perform const operation using `N`
66
|
7-
= help: const parameters may only be used as standalone arguments `N`
7+
= help: const parameters may only be used as standalone arguments, i.e. `N`
88

9-
error: generic parameters must not be used inside const evaluations
9+
error: generic parameters may not be used in const operations
1010
--> $DIR/generic-function-call-in-array-length.rs:12:13
1111
|
1212
LL | [0; foo(N)]
1313
| ^ cannot perform const operation using `N`
1414
|
15-
= help: const parameters may only be used as standalone arguments `N`
15+
= help: const parameters may only be used as standalone arguments, i.e. `N`
1616

1717
error: aborting due to 2 previous errors
1818

0 commit comments

Comments
 (0)