@@ -6,6 +6,12 @@ LL | type ArrLen<const B: bool> = [(); B];
66 |
77 = note: the length of array `[(); B]` must be type `usize`
88
9+ error[E0308]: mismatched types
10+ --> $DIR/check_const_arg_type_in_free_alias.rs:17:24
11+ |
12+ LL | type AnonArrLen = [(); true];
13+ | ^^^^ expected `usize`, found `bool`
14+
915error: the constant `B` is not of type `usize`
1016 --> $DIR/check_const_arg_type_in_free_alias.rs:19:1
1117 |
@@ -18,6 +24,12 @@ note: required by a const generic parameter in `Foo`
1824LL | struct Foo<const N: usize>;
1925 | ^^^^^^^^^^^^^^ required by this const generic parameter in `Foo`
2026
27+ error[E0308]: mismatched types
28+ --> $DIR/check_const_arg_type_in_free_alias.rs:21:25
29+ |
30+ LL | type AnonConstArg = Foo<true>;
31+ | ^^^^ expected `usize`, found `bool`
32+
2133error: the constant `B` is not of type `usize`
2234 --> $DIR/check_const_arg_type_in_free_alias.rs:32:1
2335 |
@@ -30,6 +42,12 @@ note: required by a const generic parameter in `IdentityWithUnused`
3042LL | trait IdentityWithUnused<const N: usize> {
3143 | ^^^^^^^^^^^^^^ required by this const generic parameter in `IdentityWithUnused`
3244
45+ error[E0308]: mismatched types
46+ --> $DIR/check_const_arg_type_in_free_alias.rs:34:44
47+ |
48+ LL | type AnonAlias = <() as IdentityWithUnused<true>>::This;
49+ | ^^^^ expected `usize`, found `bool`
50+
3351error: the constant `B` is not of type `usize`
3452 --> $DIR/check_const_arg_type_in_free_alias.rs:38:1
3553 |
@@ -38,6 +56,18 @@ LL | type UseFree<const B: bool> = Free<B>;
3856 |
3957 = note: the length of array `[(); B]` must be type `usize`
4058
59+ error[E0308]: mismatched types
60+ --> $DIR/check_const_arg_type_in_free_alias.rs:40:25
61+ |
62+ LL | type AnonUseFree = Free<true>;
63+ | ^^^^ expected `usize`, found `bool`
64+
65+ error[E0308]: mismatched types
66+ --> $DIR/check_const_arg_type_in_free_alias.rs:53:45
67+ |
68+ LL | type AnonUseFreeIndirectlyCorrect = UseFree<1_usize>;
69+ | ^^^^^^^ expected `bool`, found `usize`
70+
4171error: the constant `B` is not of type `usize`
4272 --> $DIR/check_const_arg_type_in_free_alias.rs:58:1
4373 |
@@ -46,6 +76,12 @@ LL | type IndirectArr<const B: bool> = Wrap<Wrap<[(); B]>>;
4676 |
4777 = note: the length of array `[(); B]` must be type `usize`
4878
79+ error[E0308]: mismatched types
80+ --> $DIR/check_const_arg_type_in_free_alias.rs:60:39
81+ |
82+ LL | type AnonIndirectArr = Wrap<Wrap<[(); true]>>;
83+ | ^^^^ expected `usize`, found `bool`
84+
4985error: the constant `B` is not of type `usize`
5086 --> $DIR/check_const_arg_type_in_free_alias.rs:62:1
5187 |
@@ -58,42 +94,6 @@ note: required by a const generic parameter in `Foo`
5894LL | struct Foo<const N: usize>;
5995 | ^^^^^^^^^^^^^^ required by this const generic parameter in `Foo`
6096
61- error[E0308]: mismatched types
62- --> $DIR/check_const_arg_type_in_free_alias.rs:17:24
63- |
64- LL | type AnonArrLen = [(); true];
65- | ^^^^ expected `usize`, found `bool`
66-
67- error[E0308]: mismatched types
68- --> $DIR/check_const_arg_type_in_free_alias.rs:21:25
69- |
70- LL | type AnonConstArg = Foo<true>;
71- | ^^^^ expected `usize`, found `bool`
72-
73- error[E0308]: mismatched types
74- --> $DIR/check_const_arg_type_in_free_alias.rs:34:44
75- |
76- LL | type AnonAlias = <() as IdentityWithUnused<true>>::This;
77- | ^^^^ expected `usize`, found `bool`
78-
79- error[E0308]: mismatched types
80- --> $DIR/check_const_arg_type_in_free_alias.rs:40:25
81- |
82- LL | type AnonUseFree = Free<true>;
83- | ^^^^ expected `usize`, found `bool`
84-
85- error[E0308]: mismatched types
86- --> $DIR/check_const_arg_type_in_free_alias.rs:53:45
87- |
88- LL | type AnonUseFreeIndirectlyCorrect = UseFree<1_usize>;
89- | ^^^^^^^ expected `bool`, found `usize`
90-
91- error[E0308]: mismatched types
92- --> $DIR/check_const_arg_type_in_free_alias.rs:60:39
93- |
94- LL | type AnonIndirectArr = Wrap<Wrap<[(); true]>>;
95- | ^^^^ expected `usize`, found `bool`
96-
9797error[E0308]: mismatched types
9898 --> $DIR/check_const_arg_type_in_free_alias.rs:64:43
9999 |
0 commit comments