Skip to content

Commit

Permalink
Add test for recursive private alias substitution in rustdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
petrochenkov committed Aug 10, 2016
1 parent d43b9cb commit 5d4ae4b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/rustdoc/private-type-alias.rs
Expand Up @@ -21,6 +21,17 @@ pub fn get_result_pub() -> MyResultPub<u32> {
panic!();
}

pub type PubRecursive = u16;
type PrivRecursive3 = u8;
type PrivRecursive2 = PubRecursive;
type PrivRecursive1 = PrivRecursive3;

// PrivRecursive1 is expanded twice and stops at u8
// PrivRecursive2 is expanded once and stops at public type alias PubRecursive
// @has private_type_alias/fn.get_result_recursive.html '//pre' '(u8, PubRecursive)'
pub fn get_result_recursive() -> (PrivRecursive1, PrivRecursive2) {
panic!();
}

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

Expand Down

0 comments on commit 5d4ae4b

Please sign in to comment.