]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/auxiliary/issue-85454.rs
Rollup merge of #106692 - eggyal:mv-binary_heap.rs-binary_heap/mod.rs, r=Mark-Simulacrum
[rust.git] / tests / rustdoc / auxiliary / issue-85454.rs
1 // @has issue_85454/trait.FromResidual.html
2 // @has - '//pre[@class="rust trait"]' 'pub trait FromResidual<R = <Self as Try>::Residual> { fn from_residual(residual: R) -> Self; }'
3 pub trait FromResidual<R = <Self as Try>::Residual> {
4     fn from_residual(residual: R) -> Self;
5 }
6
7 pub trait Try: FromResidual {
8     type Output;
9     type Residual;
10     fn from_output(output: Self::Output) -> Self;
11     fn branch(self) -> ControlFlow<Self::Residual, Self::Output>;
12 }
13
14 pub enum ControlFlow<B, C = ()> {
15     Continue(C),
16     Break(B),
17 }