summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc/issue-85454.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc/issue-85454.rs')
-rw-r--r--tests/rustdoc/issue-85454.rs29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/rustdoc/issue-85454.rs b/tests/rustdoc/issue-85454.rs
new file mode 100644
index 000000000..74fc22b31
--- /dev/null
+++ b/tests/rustdoc/issue-85454.rs
@@ -0,0 +1,29 @@
+// aux-build:issue-85454.rs
+// build-aux-docs
+#![crate_name = "foo"]
+
+extern crate issue_85454;
+
+// @has foo/trait.FromResidual.html
+// @has - '//div[@class="item-decl"]/pre[@class="rust"]' '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),
+}
+
+pub mod reexport {
+ // @has foo/reexport/trait.FromResidual.html
+ // @has - '//div[@class="item-decl"]/pre[@class="rust"]' 'pub trait FromResidual<R = <Self as Try>::Residual> { fn from_residual(residual: R) -> Self; }'
+ pub use issue_85454::*;
+}