-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #108503 - BoxyUwU:rustdog_dont_use_querynormalizer, r=o…
…li-obk,fmease 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?
- Loading branch information
Showing
3 changed files
with
56 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// check-pass | ||
// compile-flags: -Znormalize-docs | ||
// regression test for #112242 | ||
|
||
trait MyTrait<'a> { | ||
type MyItem; | ||
} | ||
struct Inner<Q>(Q); | ||
struct Outer<Q>(Inner<Q>); | ||
|
||
unsafe impl<'a, Q> Send for Inner<Q> | ||
where | ||
Q: MyTrait<'a>, | ||
<Q as MyTrait<'a>>::MyItem: Copy, | ||
{ | ||
} |