fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
7.6 KiB187 linesraw
1error: unconstrained generic constant
2  --> $DIR/abstract-const-as-cast-3.rs:17:19
3   |
4LL |     assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as u128 }>>();
5   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6   |
7   = help: try adding a `where` bound using this expression: `where [(); { O as u128 }]:`
8note: required for `HasCastInTraitImpl<{ N + 1 }, { N as u128 }>` to implement `Trait`
9  --> $DIR/abstract-const-as-cast-3.rs:8:22
10   |
11LL | impl<const O: usize> Trait for HasCastInTraitImpl<O, { O as u128 }> {}
12   |                      ^^^^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13note: required by a bound in `use_trait_impl::assert_impl`
14  --> $DIR/abstract-const-as-cast-3.rs:14:23
15   |
16LL |     fn assert_impl<T: Trait>() {}
17   |                       ^^^^^ required by this bound in `assert_impl`
18
19error[E0308]: mismatched types
20  --> $DIR/abstract-const-as-cast-3.rs:17:5
21   |
22LL |     assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as u128 }>>();
23   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `{ N as u128 }`, found `{ O as u128 }`
24   |
25   = note: expected constant `{ N as u128 }`
26              found constant `{ O as u128 }`
27note: required by a bound in `use_trait_impl::assert_impl`
28  --> $DIR/abstract-const-as-cast-3.rs:14:23
29   |
30LL |     fn assert_impl<T: Trait>() {}
31   |                       ^^^^^ required by this bound in `assert_impl`
32
33error: unconstrained generic constant
34  --> $DIR/abstract-const-as-cast-3.rs:20:19
35   |
36LL |     assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as _ }>>();
37   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38   |
39   = help: try adding a `where` bound using this expression: `where [(); { O as u128 }]:`
40note: required for `HasCastInTraitImpl<{ N + 1 }, { N as _ }>` to implement `Trait`
41  --> $DIR/abstract-const-as-cast-3.rs:8:22
42   |
43LL | impl<const O: usize> Trait for HasCastInTraitImpl<O, { O as u128 }> {}
44   |                      ^^^^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45note: required by a bound in `use_trait_impl::assert_impl`
46  --> $DIR/abstract-const-as-cast-3.rs:14:23
47   |
48LL |     fn assert_impl<T: Trait>() {}
49   |                       ^^^^^ required by this bound in `assert_impl`
50
51error[E0308]: mismatched types
52  --> $DIR/abstract-const-as-cast-3.rs:20:5
53   |
54LL |     assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as _ }>>();
55   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `{ N as _ }`, found `{ O as u128 }`
56   |
57   = note: expected constant `{ N as _ }`
58              found constant `{ O as u128 }`
59note: required by a bound in `use_trait_impl::assert_impl`
60  --> $DIR/abstract-const-as-cast-3.rs:14:23
61   |
62LL |     fn assert_impl<T: Trait>() {}
63   |                       ^^^^^ required by this bound in `assert_impl`
64
65error[E0308]: mismatched types
66  --> $DIR/abstract-const-as-cast-3.rs:23:5
67   |
68LL |     assert_impl::<HasCastInTraitImpl<13, { 12 as u128 }>>();
69   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `12`, found `13`
70   |
71   = note: expected constant `12`
72              found constant `13`
73note: required by a bound in `use_trait_impl::assert_impl`
74  --> $DIR/abstract-const-as-cast-3.rs:14:23
75   |
76LL |     fn assert_impl<T: Trait>() {}
77   |                       ^^^^^ required by this bound in `assert_impl`
78
79error[E0308]: mismatched types
80  --> $DIR/abstract-const-as-cast-3.rs:25:5
81   |
82LL |     assert_impl::<HasCastInTraitImpl<14, 13>>();
83   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `13`, found `14`
84   |
85   = note: expected constant `13`
86              found constant `14`
87note: required by a bound in `use_trait_impl::assert_impl`
88  --> $DIR/abstract-const-as-cast-3.rs:14:23
89   |
90LL |     fn assert_impl<T: Trait>() {}
91   |                       ^^^^^ required by this bound in `assert_impl`
92
93error: unconstrained generic constant
94  --> $DIR/abstract-const-as-cast-3.rs:35:19
95   |
96LL |     assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as u128 }>>();
97   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
98   |
99   = help: try adding a `where` bound using this expression: `where [(); { O as u128 }]:`
100note: required for `HasCastInTraitImpl<{ N + 1 }, { N as u128 }>` to implement `Trait`
101  --> $DIR/abstract-const-as-cast-3.rs:8:22
102   |
103LL | impl<const O: usize> Trait for HasCastInTraitImpl<O, { O as u128 }> {}
104   |                      ^^^^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
105note: required by a bound in `use_trait_impl_2::assert_impl`
106  --> $DIR/abstract-const-as-cast-3.rs:32:23
107   |
108LL |     fn assert_impl<T: Trait>() {}
109   |                       ^^^^^ required by this bound in `assert_impl`
110
111error[E0308]: mismatched types
112  --> $DIR/abstract-const-as-cast-3.rs:35:5
113   |
114LL |     assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as u128 }>>();
115   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `{ N as u128 }`, found `{ O as u128 }`
116   |
117   = note: expected constant `{ N as u128 }`
118              found constant `{ O as u128 }`
119note: required by a bound in `use_trait_impl_2::assert_impl`
120  --> $DIR/abstract-const-as-cast-3.rs:32:23
121   |
122LL |     fn assert_impl<T: Trait>() {}
123   |                       ^^^^^ required by this bound in `assert_impl`
124
125error: unconstrained generic constant
126  --> $DIR/abstract-const-as-cast-3.rs:38:19
127   |
128LL |     assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as _ }>>();
129   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
130   |
131   = help: try adding a `where` bound using this expression: `where [(); { O as u128 }]:`
132note: required for `HasCastInTraitImpl<{ N + 1 }, { N as _ }>` to implement `Trait`
133  --> $DIR/abstract-const-as-cast-3.rs:8:22
134   |
135LL | impl<const O: usize> Trait for HasCastInTraitImpl<O, { O as u128 }> {}
136   |                      ^^^^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
137note: required by a bound in `use_trait_impl_2::assert_impl`
138  --> $DIR/abstract-const-as-cast-3.rs:32:23
139   |
140LL |     fn assert_impl<T: Trait>() {}
141   |                       ^^^^^ required by this bound in `assert_impl`
142
143error[E0308]: mismatched types
144  --> $DIR/abstract-const-as-cast-3.rs:38:5
145   |
146LL |     assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as _ }>>();
147   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `{ N as _ }`, found `{ O as u128 }`
148   |
149   = note: expected constant `{ N as _ }`
150              found constant `{ O as u128 }`
151note: required by a bound in `use_trait_impl_2::assert_impl`
152  --> $DIR/abstract-const-as-cast-3.rs:32:23
153   |
154LL |     fn assert_impl<T: Trait>() {}
155   |                       ^^^^^ required by this bound in `assert_impl`
156
157error[E0308]: mismatched types
158  --> $DIR/abstract-const-as-cast-3.rs:41:5
159   |
160LL |     assert_impl::<HasCastInTraitImpl<13, { 12 as u128 }>>();
161   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `12`, found `13`
162   |
163   = note: expected constant `12`
164              found constant `13`
165note: required by a bound in `use_trait_impl_2::assert_impl`
166  --> $DIR/abstract-const-as-cast-3.rs:32:23
167   |
168LL |     fn assert_impl<T: Trait>() {}
169   |                       ^^^^^ required by this bound in `assert_impl`
170
171error[E0308]: mismatched types
172  --> $DIR/abstract-const-as-cast-3.rs:43:5
173   |
174LL |     assert_impl::<HasCastInTraitImpl<14, 13>>();
175   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `13`, found `14`
176   |
177   = note: expected constant `13`
178              found constant `14`
179note: required by a bound in `use_trait_impl_2::assert_impl`
180  --> $DIR/abstract-const-as-cast-3.rs:32:23
181   |
182LL |     fn assert_impl<T: Trait>() {}
183   |                       ^^^^^ required by this bound in `assert_impl`
184
185error: aborting due to 12 previous errors
186
187For more information about this error, try `rustc --explain E0308`.