Skip to content

Commit 5d4ae4b

Browse files
committed
Add test for recursive private alias substitution in rustdoc
1 parent d43b9cb commit 5d4ae4b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/test/rustdoc/private-type-alias.rs

+11
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,17 @@ pub fn get_result_pub() -> MyResultPub<u32> {
2121
panic!();
2222
}
2323

24+
pub type PubRecursive = u16;
25+
type PrivRecursive3 = u8;
26+
type PrivRecursive2 = PubRecursive;
27+
type PrivRecursive1 = PrivRecursive3;
28+
29+
// PrivRecursive1 is expanded twice and stops at u8
30+
// PrivRecursive2 is expanded once and stops at public type alias PubRecursive
31+
// @has private_type_alias/fn.get_result_recursive.html '//pre' '(u8, PubRecursive)'
32+
pub fn get_result_recursive() -> (PrivRecursive1, PrivRecursive2) {
33+
panic!();
34+
}
2435

2536
type MyLifetimePriv<'a> = &'a isize;
2637

0 commit comments

Comments
 (0)