From 08f0f7c54afdce576525ff37c5af871ef3a952e0 Mon Sep 17 00:00:00 2001 From: petrochenkov Date: Thu, 7 Jul 2016 18:20:26 +0300 Subject: Substitute private type aliases in rustdoc --- src/test/rustdoc/private-type-alias.rs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/test/rustdoc/private-type-alias.rs (limited to 'src/test/rustdoc') diff --git a/src/test/rustdoc/private-type-alias.rs b/src/test/rustdoc/private-type-alias.rs new file mode 100644 index 00000000000..65e3e023830 --- /dev/null +++ b/src/test/rustdoc/private-type-alias.rs @@ -0,0 +1,30 @@ +// Copyright 2016 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +type MyResultPriv = Result; +pub type MyResultPub = Result; + +// @has private_type_alias/fn.get_result_priv.html '//pre' 'Result' +pub fn get_result_priv() -> MyResultPriv { + panic!(); +} + +// @has private_type_alias/fn.get_result_pub.html '//pre' 'MyResultPub' +pub fn get_result_pub() -> MyResultPub { + panic!(); +} + + +type MyLifetimePriv<'a> = &'a isize; + +// @has private_type_alias/fn.get_lifetime_priv.html '//pre' "&'static isize" +pub fn get_lifetime_priv() -> MyLifetimePriv<'static> { + panic!(); +} -- cgit 1.4.1-3-g733a5