-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add rustdoc tests for
lazy_type_alias
- Loading branch information
1 parent
60ec840
commit 1af48be
Showing
4 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// aux-build:alias-reexport.rs | ||
// aux-build:alias-reexport2.rs | ||
|
||
#![crate_name = "foo"] | ||
#![feature(lazy_type_alias)] | ||
|
||
extern crate alias_reexport2; | ||
|
||
// @has 'foo/reexport/fn.foo.html' | ||
// FIXME: should be 'pub fn foo() -> Reexport' | ||
// @has - '//*[@class="rust item-decl"]' 'pub fn foo() -> u8' | ||
// @has 'foo/reexport/fn.foo2.html' | ||
// FIXME: should be 'pub fn foo2() -> Result<Reexport, ()>' | ||
// @has - '//*[@class="rust item-decl"]' 'pub fn foo2() -> Result<u8, ()>' | ||
// @has 'foo/reexport/type.Reexported.html' | ||
// @has - '//*[@class="rust item-decl"]' 'pub type Reexported = u8;' | ||
#[doc(inline)] | ||
pub use alias_reexport2 as reexport; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// gate-test-lazy_type_alias | ||
// aux-build:alias-reexport.rs | ||
|
||
#![crate_name = "foo"] | ||
#![feature(lazy_type_alias)] | ||
|
||
extern crate alias_reexport; | ||
|
||
use alias_reexport::Reexported; | ||
|
||
// @has 'foo/fn.foo.html' | ||
// @has - '//*[@class="rust item-decl"]' 'pub fn foo() -> Reexported' | ||
pub fn foo() -> Reexported { 0 } | ||
// @has 'foo/fn.foo2.html' | ||
// @has - '//*[@class="rust item-decl"]' 'pub fn foo2() -> Result<Reexported, ()>' | ||
pub fn foo2() -> Result<Reexported, ()> { Ok(0) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#![feature(lazy_type_alias)] | ||
|
||
pub type Reexported = u8; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#![feature(lazy_type_alias)] | ||
|
||
extern crate alias_reexport; | ||
|
||
pub use alias_reexport::Reexported; | ||
|
||
// @has 'foo/fn.foo.html' | ||
// @has - '//*[@class="docblock item-decl"]' 'pub fn foo() -> Reexported' | ||
pub fn foo() -> Reexported { 0 } | ||
// @has 'foo/fn.foo2.html' | ||
// @has - '//*[@class="docblock item-decl"]' 'pub fn foo2() -> Result<Reexported, ()>' | ||
pub fn foo2() -> Result<Reexported, ()> { Ok(0) } |