]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/issue-85454.rs
Rollup merge of #106922 - ChayimFriedman2:patch-5, r=workingjubilee
[rust.git] / tests / rustdoc / issue-85454.rs
1 // aux-build:issue-85454.rs
2 // build-aux-docs
3 #![crate_name = "foo"]
4
5 extern crate issue_85454;
6
7 // @has foo/trait.FromResidual.html
8 // @has - '//div[@class="item-decl"]/pre[@class="rust"]' 'pub trait FromResidual<R = <Self as Try>::Residual> { fn from_residual(residual: R) -> Self; }'
9 pub trait FromResidual<R = <Self as Try>::Residual> {
10     fn from_residual(residual: R) -> Self;
11 }
12
13 pub trait Try: FromResidual {
14     type Output;
15     type Residual;
16     fn from_output(output: Self::Output) -> Self;
17     fn branch(self) -> ControlFlow<Self::Residual, Self::Output>;
18 }
19
20 pub enum ControlFlow<B, C = ()> {
21     Continue(C),
22     Break(B),
23 }
24
25 pub mod reexport {
26     // @has foo/reexport/trait.FromResidual.html
27     // @has - '//div[@class="item-decl"]/pre[@class="rust"]' 'pub trait FromResidual<R = <Self as Try>::Residual> { fn from_residual(residual: R) -> Self; }'
28     pub use issue_85454::*;
29 }