@@ -4,7 +4,7 @@ error: unconstrained generic constant
4
4
LL | fn foo1<const N: usize>() -> HasTrait<HasCastInTraitImpl<{ N + 2}, { N }>> {
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
6
|
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 }]:`
8
8
note: required because of the requirements on the impl of `Trait` for `HasCastInTraitImpl<{ N + 2}, N>`
9
9
--> $DIR/mismatched-const-errors.rs:6:22
10
10
|
@@ -31,7 +31,7 @@ error: unconstrained generic constant
31
31
LL | fn foo2<const N: usize>() -> HasTrait<HasCastInTraitImpl<{ N + 1}, { N + 1 }>> {
32
32
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33
33
|
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 }]:`
35
35
note: required because of the requirements on the impl of `Trait` for `HasCastInTraitImpl<{ N + 1}, { N + 1 }>`
36
36
--> $DIR/mismatched-const-errors.rs:6:22
37
37
|
@@ -58,7 +58,7 @@ error: unconstrained generic constant
58
58
LL | fn foo3<const N: usize>() -> HasTrait<HasCastInTraitImpl<{ N + 1}, { N - 1}>> {
59
59
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60
60
|
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 }]:`
62
62
note: required because of the requirements on the impl of `Trait` for `HasCastInTraitImpl<{ N + 1}, { N - 1}>`
63
63
--> $DIR/mismatched-const-errors.rs:6:22
64
64
|
@@ -80,12 +80,12 @@ LL | fn foo3<const N: usize>() -> HasTrait<HasCastInTraitImpl<{ N + 1}, { N - 1}
80
80
found type `{ N + 1 + 1 }`
81
81
82
82
error: unconstrained generic constant
83
- --> $DIR/mismatched-const-errors.rs:28 :44
83
+ --> $DIR/mismatched-const-errors.rs:27 :44
84
84
|
85
85
LL | fn foo4<const N: usize>(c : [usize; N]) -> HasTrait<HasCastInTraitImpl<{ N - 1}, { N }>> {
86
86
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
87
87
|
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 }]:`
89
89
note: required because of the requirements on the impl of `Trait` for `HasCastInTraitImpl<{ N - 1}, N>`
90
90
--> $DIR/mismatched-const-errors.rs:6:22
91
91
|
@@ -98,7 +98,7 @@ LL | pub struct HasTrait<T: Trait>(T);
98
98
| ^^^^^ required by this bound in `HasTrait`
99
99
100
100
error[E0308]: mismatched types
101
- --> $DIR/mismatched-const-errors.rs:28 :44
101
+ --> $DIR/mismatched-const-errors.rs:27 :44
102
102
|
103
103
LL | fn foo4<const N: usize>(c : [usize; N]) -> HasTrait<HasCastInTraitImpl<{ N - 1}, { N }>> {
104
104
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `N`, found `{ N - 1 + 1 }`
@@ -107,12 +107,12 @@ LL | fn foo4<const N: usize>(c : [usize; N]) -> HasTrait<HasCastInTraitImpl<{ N
107
107
found type `{ N - 1 + 1 }`
108
108
109
109
error: unconstrained generic constant
110
- --> $DIR/mismatched-const-errors.rs:34 :30
110
+ --> $DIR/mismatched-const-errors.rs:33 :30
111
111
|
112
112
LL | fn foo5<const N: usize>() -> HasTrait<HasCastInTraitImpl<{ N + N }, { 2 * N }>> {
113
113
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
114
114
|
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 }]:`
116
116
note: required because of the requirements on the impl of `Trait` for `HasCastInTraitImpl<{ N + N }, { 2 * N }>`
117
117
--> $DIR/mismatched-const-errors.rs:6:22
118
118
|
@@ -125,7 +125,7 @@ LL | pub struct HasTrait<T: Trait>(T);
125
125
| ^^^^^ required by this bound in `HasTrait`
126
126
127
127
error[E0308]: mismatched types
128
- --> $DIR/mismatched-const-errors.rs:34 :30
128
+ --> $DIR/mismatched-const-errors.rs:33 :30
129
129
|
130
130
LL | fn foo5<const N: usize>() -> HasTrait<HasCastInTraitImpl<{ N + N }, { 2 * N }>> {
131
131
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `{ 2 * N }`, found `{ N + N + 1 }`
0 commit comments