Commit ec724ac
committed
Auto merge of rust-lang#89229 - oli-obk:i_love_inferctxt, r=jackh726
Remove redundant member-constraint check
impl trait will, for each lifetime in the hidden type, register a "member constraint" that says the lifetime must be equal or outlive one of the lifetimes of the impl trait. These member constraints will be solved by borrowck
But, as you can see in the big red block of removed code, there was an ad-hoc check for member constraints happening at the site where they get registered. This check had some minor effects on diagnostics, but will fall down on its feet with my big type alias impl trait refactor. So we removed it and I pulled the removal out into a (hopefully) reviewable PR that works on master directly.File tree
38 files changed
+271
-702
lines changed- compiler
- rustc_borrowck/src
- region_infer
- type_check
- rustc_error_codes/src/error_codes
- rustc_infer/src/infer
- error_reporting
- lexical_region_resolve
- rustc_trait_selection/src
- rustc_typeck/src/check
- src/test/ui
- async-await/multiple-lifetimes
- impl-trait
- multiple-lifetimes
- nll
- ty-outlives
- self
- suggestions
- lifetimes
38 files changed
+271
-702
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
689 | 689 | | |
690 | 690 | | |
691 | 691 | | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
692 | 702 | | |
693 | 703 | | |
694 | 704 | | |
| |||
Lines changed: 1 addition & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | | - | |
| 9 | + | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | | - | |
18 | 16 | | |
19 | 17 | | |
20 | 18 | | |
| |||
383 | 381 | | |
384 | 382 | | |
385 | 383 | | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
189 | 188 | | |
190 | 189 | | |
191 | 190 | | |
| |||
253 | 252 | | |
254 | 253 | | |
255 | 254 | | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
| 255 | + | |
265 | 256 | | |
266 | 257 | | |
267 | 258 | | |
| |||
272 | 263 | | |
273 | 264 | | |
274 | 265 | | |
275 | | - | |
276 | 266 | | |
277 | 267 | | |
278 | 268 | | |
| |||
282 | 272 | | |
283 | 273 | | |
284 | 274 | | |
285 | | - | |
286 | 275 | | |
287 | 276 | | |
288 | 277 | | |
| |||
901 | 890 | | |
902 | 891 | | |
903 | 892 | | |
904 | | - | |
905 | 893 | | |
906 | 894 | | |
907 | 895 | | |
| |||
1050 | 1038 | | |
1051 | 1039 | | |
1052 | 1040 | | |
1053 | | - | |
1054 | 1041 | | |
1055 | 1042 | | |
1056 | 1043 | | |
| |||
1062 | 1049 | | |
1063 | 1050 | | |
1064 | 1051 | | |
1065 | | - | |
1066 | 1052 | | |
1067 | 1053 | | |
1068 | 1054 | | |
| |||
1322 | 1308 | | |
1323 | 1309 | | |
1324 | 1310 | | |
1325 | | - | |
1326 | | - | |
1327 | 1311 | | |
1328 | 1312 | | |
1329 | 1313 | | |
| |||
1335 | 1319 | | |
1336 | 1320 | | |
1337 | 1321 | | |
1338 | | - | |
1339 | | - | |
1340 | | - | |
1341 | | - | |
1342 | | - | |
1343 | | - | |
| 1322 | + | |
1344 | 1323 | | |
1345 | 1324 | | |
1346 | 1325 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
5 | | - | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
44 | | - | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | 389 | | |
405 | 390 | | |
406 | 391 | | |
| |||
438 | 423 | | |
439 | 424 | | |
440 | 425 | | |
441 | | - | |
442 | | - | |
| 426 | + | |
443 | 427 | | |
444 | 428 | | |
445 | 429 | | |
| |||
454 | 438 | | |
455 | 439 | | |
456 | 440 | | |
457 | | - | |
458 | 441 | | |
459 | 442 | | |
460 | 443 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | 56 | | |
60 | 57 | | |
61 | 58 | | |
| |||
281 | 278 | | |
282 | 279 | | |
283 | 280 | | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | 281 | | |
302 | 282 | | |
303 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
71 | 69 | | |
72 | 70 | | |
73 | 71 | | |
| |||
131 | 129 | | |
132 | 130 | | |
133 | 131 | | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | 132 | | |
156 | 133 | | |
157 | 134 | | |
| |||
0 commit comments