Commit 846cdcf
authored
Rollup merge of rust-lang#108503 - BoxyUwU:rustdog_dont_use_querynormalizer, r=oli-obk
use `ObligationCtxt` not `QueryNormalizer` in rustdoc's `normalization`
`QueryNormalizer` doesn't handle not-well-formed projections or ambiguity so should not be used by rustdoc as rustdoc happens on code that is not well formed. This PR replaces the usage of `QueryNormalizer` with `ObligationCtxt::normalize` which is designed to work on not-wf code while not being in typeck. This also removes two uses of `actually_rustdoc` from the compiler which seems good to me.
I am somewhat confused as to the "point" of `QueryNormalizer`, it intends to be "the main way of normalizing" in the future and yet ICEs when encountering not wf types or when normalization is ambiguous which seems very incompatible with its stated goal since that makes it only suitable for using after typeck?File tree
2 files changed
+40
-21
lines changed- compiler/rustc_trait_selection/src/traits/query
- src/librustdoc/clean
2 files changed
+40
-21
lines changedLines changed: 4 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
295 | 291 | | |
296 | 292 | | |
297 | 293 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1666 | 1666 | | |
1667 | 1667 | | |
1668 | 1668 | | |
1669 | | - | |
| 1669 | + | |
1670 | 1670 | | |
1671 | 1671 | | |
1672 | | - | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
1673 | 1677 | | |
1674 | | - | |
1675 | | - | |
1676 | | - | |
1677 | | - | |
1678 | | - | |
1679 | | - | |
1680 | | - | |
1681 | | - | |
1682 | | - | |
1683 | | - | |
1684 | | - | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
1685 | 1708 | | |
1686 | 1709 | | |
1687 | 1710 | | |
| |||
0 commit comments