forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#123375 - fmease:rustdoc-sati-re-hotfix, r=G…
…uillaumeGomez rustdoc: synthetic auto trait impls: accept unresolved region vars for now rust-lang#123348 (comment): > Right, [in rust-lang#123340] I've intentionally changed a `vid_map.get(vid).unwrap_or(r)` to a `vid_map[vid]` making rustdoc panic if `rustc::AutoTraitFinder` returns a region inference variable that cannot be resolved because that is really fishy. I can change it back with a `FIXME: investigate` […]. [O]nce I [fully] understand [the arcane] `rustc::AutoTraitFinder` [I] can fix the underlying issue if there's one. > > `rustc::AutoTraitFinder` can also return placeholder regions `RePlaceholder` which doesn't seem right either and which makes rustdoc ICE, too (we have a GitHub issue for that already[, namely rust-lang#120606]). Fixes rust-lang#123370. Fixes rust-lang#112242. r? ``@GuillaumeGomez``
- Loading branch information
Showing
3 changed files
with
35 additions
and
1 deletion.
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
17 changes: 17 additions & 0 deletions
17
tests/rustdoc-ui/synthetic-auto-trait-impls/lifetime-generic-user-impl-normalize.rs
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,17 @@ | ||
// We used to ICE here while trying to synthesize auto trait impls. | ||
// issue: 112242 | ||
//@ check-pass | ||
//@ compile-flags: -Znormalize-docs | ||
|
||
pub trait MyTrait<'a> { | ||
type MyItem; | ||
} | ||
pub struct Inner<Q>(Q); | ||
pub struct Outer<Q>(Inner<Q>); | ||
|
||
impl<'a, Q> std::marker::Unpin for Inner<Q> | ||
where | ||
Q: MyTrait<'a>, | ||
<Q as MyTrait<'a>>::MyItem: Copy, | ||
{ | ||
} |
11 changes: 11 additions & 0 deletions
11
tests/rustdoc-ui/synthetic-auto-trait-impls/lifetime-generic-user-impl.rs
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,11 @@ | ||
// We used to ICE here while trying to synthesize auto trait impls. | ||
// issue: 123370 | ||
//@ check-pass | ||
|
||
pub struct Inner<'a, Q>(&'a (), Q); | ||
|
||
pub struct Outer<'a, Q>(Inner<'a, Q>); | ||
|
||
impl<'a, Q: Trait<'a>> std::marker::Unpin for Inner<'static, Q> {} | ||
|
||
pub trait Trait<'a> {} |