Skip to content

Commit bf67758

Browse files
committed
bless tests
1 parent e1b1b2f commit bf67758

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/test/ui/const-generics/defaults/generic-expr-default.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: unconstrained generic constant
44
LL | pub fn needs_evaluatable_bound<const N1: usize>() -> Foo<N1> {
55
| ^^^^^^^
66
|
7-
= help: try adding a `where` bound using this expression: `where [(); { N + 1 }]:`
7+
= help: try adding a `where` bound using this expression: `where [(); { N1 + 1 }]:`
88

99
error: unconstrained generic constant
1010
--> $DIR/generic-expr-default.rs:14:58

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: unconstrained generic constant
44
LL | struct ArithArrayLen<const N: usize>([u32; 0 + N]);
55
| ^^^^^^^^^^^^
66
|
7-
= help: try adding a `where` bound using this expression: `where [(); 0 + N]:`
7+
= help: try adding a `where` bound using this expression: `where [(); { 0 + N }]:`
88

99
error: overly complex generic constant
1010
--> $DIR/array-size-in-generic-struct-param.rs:19:15

src/test/ui/const-generics/mismatched-const-errors.stderr

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: unconstrained generic constant
44
LL | fn foo1<const N: usize>() -> HasTrait<HasCastInTraitImpl<{ N + 2}, { N }>> {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= help: try adding a `where` bound using this expression: `where [(); { M + 1 }]:`
7+
= help: try adding a `where` bound using this expression: `where [(); { N + 2 + 1 }]:`
88
note: required because of the requirements on the impl of `Trait` for `HasCastInTraitImpl<{ N + 2}, N>`
99
--> $DIR/mismatched-const-errors.rs:6:22
1010
|
@@ -31,7 +31,7 @@ error: unconstrained generic constant
3131
LL | fn foo2<const N: usize>() -> HasTrait<HasCastInTraitImpl<{ N + 1}, { N + 1 }>> {
3232
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3333
|
34-
= help: try adding a `where` bound using this expression: `where [(); { M + 1 }]:`
34+
= help: try adding a `where` bound using this expression: `where [(); { N + 1 + 1 }]:`
3535
note: required because of the requirements on the impl of `Trait` for `HasCastInTraitImpl<{ N + 1}, { N + 1 }>`
3636
--> $DIR/mismatched-const-errors.rs:6:22
3737
|
@@ -58,7 +58,7 @@ error: unconstrained generic constant
5858
LL | fn foo3<const N: usize>() -> HasTrait<HasCastInTraitImpl<{ N + 1}, { N - 1}>> {
5959
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6060
|
61-
= help: try adding a `where` bound using this expression: `where [(); { M + 1 }]:`
61+
= help: try adding a `where` bound using this expression: `where [(); { N + 1 + 1 }]:`
6262
note: required because of the requirements on the impl of `Trait` for `HasCastInTraitImpl<{ N + 1}, { N - 1}>`
6363
--> $DIR/mismatched-const-errors.rs:6:22
6464
|
@@ -80,12 +80,12 @@ LL | fn foo3<const N: usize>() -> HasTrait<HasCastInTraitImpl<{ N + 1}, { N - 1}
8080
found type `{ N + 1 + 1 }`
8181

8282
error: unconstrained generic constant
83-
--> $DIR/mismatched-const-errors.rs:28:44
83+
--> $DIR/mismatched-const-errors.rs:27:44
8484
|
8585
LL | fn foo4<const N: usize>(c : [usize; N]) -> HasTrait<HasCastInTraitImpl<{ N - 1}, { N }>> {
8686
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8787
|
88-
= help: try adding a `where` bound using this expression: `where [(); { M + 1 }]:`
88+
= help: try adding a `where` bound using this expression: `where [(); { N - 1 + 1 }]:`
8989
note: required because of the requirements on the impl of `Trait` for `HasCastInTraitImpl<{ N - 1}, N>`
9090
--> $DIR/mismatched-const-errors.rs:6:22
9191
|
@@ -98,7 +98,7 @@ LL | pub struct HasTrait<T: Trait>(T);
9898
| ^^^^^ required by this bound in `HasTrait`
9999

100100
error[E0308]: mismatched types
101-
--> $DIR/mismatched-const-errors.rs:28:44
101+
--> $DIR/mismatched-const-errors.rs:27:44
102102
|
103103
LL | fn foo4<const N: usize>(c : [usize; N]) -> HasTrait<HasCastInTraitImpl<{ N - 1}, { N }>> {
104104
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `N`, found `{ N - 1 + 1 }`
@@ -107,12 +107,12 @@ LL | fn foo4<const N: usize>(c : [usize; N]) -> HasTrait<HasCastInTraitImpl<{ N
107107
found type `{ N - 1 + 1 }`
108108

109109
error: unconstrained generic constant
110-
--> $DIR/mismatched-const-errors.rs:34:30
110+
--> $DIR/mismatched-const-errors.rs:33:30
111111
|
112112
LL | fn foo5<const N: usize>() -> HasTrait<HasCastInTraitImpl<{ N + N }, { 2 * N }>> {
113113
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
114114
|
115-
= help: try adding a `where` bound using this expression: `where [(); { M + 1 }]:`
115+
= help: try adding a `where` bound using this expression: `where [(); { N + N + 1 }]:`
116116
note: required because of the requirements on the impl of `Trait` for `HasCastInTraitImpl<{ N + N }, { 2 * N }>`
117117
--> $DIR/mismatched-const-errors.rs:6:22
118118
|
@@ -125,7 +125,7 @@ LL | pub struct HasTrait<T: Trait>(T);
125125
| ^^^^^ required by this bound in `HasTrait`
126126

127127
error[E0308]: mismatched types
128-
--> $DIR/mismatched-const-errors.rs:34:30
128+
--> $DIR/mismatched-const-errors.rs:33:30
129129
|
130130
LL | fn foo5<const N: usize>() -> HasTrait<HasCastInTraitImpl<{ N + N }, { 2 * N }>> {
131131
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `{ 2 * N }`, found `{ N + N + 1 }`

0 commit comments

Comments
 (0)