Skip to content

Commit d637ed4

Browse files
committed
rustdoc: add test for issue-85454
1 parent 449a431 commit d637ed4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/test/rustdoc/issue-85454.rs

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
}

0 commit comments

Comments
 (0)