This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit d03456d
committed
Auto merge of rust-lang#87338 - SparrowLii:MaybeTrait, r=wesleywiser
Simplify the collecting of `? Trait` bounds in where clause
This PR fixes the FIXME about using less rightward drift and only one error reporting when collecting of `?Trait` bounds in where clause.
Checking whether the path length of `bound_ty` is 1 can be replaced by whether `unresolved_segments` in the partial_res is 0.
Checking whether the `param.kind` is `Type{...}` can also be omitted. One Fx hash calculation will be done for Const or Lifetime param, but the impact on efficiency should be small IMO1 file changed
+17
-33
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1373 | 1373 | | |
1374 | 1374 | | |
1375 | 1375 | | |
1376 | | - | |
1377 | | - | |
1378 | | - | |
1379 | 1376 | | |
1380 | 1377 | | |
1381 | 1378 | | |
1382 | 1379 | | |
1383 | 1380 | | |
1384 | | - | |
1385 | | - | |
1386 | | - | |
1387 | | - | |
1388 | | - | |
1389 | | - | |
1390 | | - | |
1391 | 1381 | | |
1392 | | - | |
1393 | | - | |
1394 | | - | |
1395 | | - | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
1396 | 1389 | | |
1397 | | - | |
1398 | | - | |
1399 | | - | |
1400 | | - | |
1401 | | - | |
1402 | | - | |
1403 | | - | |
1404 | | - | |
1405 | | - | |
1406 | | - | |
1407 | | - | |
1408 | | - | |
1409 | | - | |
1410 | | - | |
1411 | | - | |
1412 | | - | |
1413 | | - | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
1414 | 1394 | | |
1415 | 1395 | | |
1416 | | - | |
1417 | 1396 | | |
1418 | | - | |
| 1397 | + | |
1419 | 1398 | | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
1420 | 1404 | | |
1421 | 1405 | | |
1422 | 1406 | | |
| |||
0 commit comments