File tree 2 files changed +8
-8
lines changed
2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ impl<T: 'static> GetTypeId<T> {
17
17
18
18
const fn check_type_id < T : ' static > ( ) -> bool {
19
19
matches ! ( GetTypeId :: <T >:: VALUE , GetTypeId :: <T >:: VALUE )
20
- //~^ ERROR could not evaluate constant pattern
21
- //~| ERROR could not evaluate constant pattern
20
+ //~^ ERROR constant pattern depends on a generic parameter
21
+ //~| ERROR constant pattern depends on a generic parameter
22
22
}
23
23
24
24
pub struct GetTypeNameLen < T > ( T ) ;
@@ -29,8 +29,8 @@ impl<T: 'static> GetTypeNameLen<T> {
29
29
30
30
const fn check_type_name_len < T : ' static > ( ) -> bool {
31
31
matches ! ( GetTypeNameLen :: <T >:: VALUE , GetTypeNameLen :: <T >:: VALUE )
32
- //~^ ERROR could not evaluate constant pattern
33
- //~| ERROR could not evaluate constant pattern
32
+ //~^ ERROR constant pattern depends on a generic parameter
33
+ //~| ERROR constant pattern depends on a generic parameter
34
34
}
35
35
36
36
fn main ( ) {
Original file line number Diff line number Diff line change 1
- error: could not evaluate constant pattern
1
+ error: constant pattern depends on a generic parameter
2
2
--> $DIR/issue-73976-polymorphic.rs:19:37
3
3
|
4
4
LL | matches!(GetTypeId::<T>::VALUE, GetTypeId::<T>::VALUE)
5
5
| ^^^^^^^^^^^^^^^^^^^^^
6
6
7
- error: could not evaluate constant pattern
7
+ error: constant pattern depends on a generic parameter
8
8
--> $DIR/issue-73976-polymorphic.rs:31:42
9
9
|
10
10
LL | matches!(GetTypeNameLen::<T>::VALUE, GetTypeNameLen::<T>::VALUE)
11
11
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
12
12
13
- error: could not evaluate constant pattern
13
+ error: constant pattern depends on a generic parameter
14
14
--> $DIR/issue-73976-polymorphic.rs:19:37
15
15
|
16
16
LL | matches!(GetTypeId::<T>::VALUE, GetTypeId::<T>::VALUE)
17
17
| ^^^^^^^^^^^^^^^^^^^^^
18
18
19
- error: could not evaluate constant pattern
19
+ error: constant pattern depends on a generic parameter
20
20
--> $DIR/issue-73976-polymorphic.rs:31:42
21
21
|
22
22
LL | matches!(GetTypeNameLen::<T>::VALUE, GetTypeNameLen::<T>::VALUE)
You can’t perform that action at this time.
0 commit comments