-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 #86449 - Stupremee:render-self-cast-in-type-bound, r=Gu…
…illaumeGomez rustdoc: Render `<Self as X>::Y` type casts properly across crate bounds My last PR that introduced the type casting did not work for cross-crate re-exported traits, which is fixed in this PR. Fully resolves #85454
- Loading branch information
Showing
3 changed files
with
48 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// @has issue_85454/trait.FromResidual.html | ||
// @has - '//pre[@class="rust trait"]' 'pub trait FromResidual<R = <Self as Try>::Residual> { fn from_residual(residual: R) -> Self; }' | ||
pub trait FromResidual<R = <Self as Try>::Residual> { | ||
fn from_residual(residual: R) -> Self; | ||
} | ||
|
||
pub trait Try: FromResidual { | ||
type Output; | ||
type Residual; | ||
fn from_output(output: Self::Output) -> Self; | ||
fn branch(self) -> ControlFlow<Self::Residual, Self::Output>; | ||
} | ||
|
||
pub enum ControlFlow<B, C = ()> { | ||
Continue(C), | ||
Break(B), | ||
} |
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