diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2018-01-26 06:51:58 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2018-01-26 06:51:58 -0800 |
| commit | 1dc85768d2c361b8d744d31fde369a84546c531f (patch) | |
| tree | ebe150af3253a0a88566079bfae060c41ede0416 /src/test/rustdoc | |
| parent | a9101095e8dfe3558f822f7f16e8fb5fe8d8a63e (diff) | |
| parent | 77bc826f90b479813f22bbae907c87a43693299b (diff) | |
| download | rust-1dc85768d2c361b8d744d31fde369a84546c531f.tar.gz rust-1dc85768d2c361b8d744d31fde369a84546c531f.zip | |
Merge branch 'rustdoc_masked' of https://github.com/ollie27/rust into rollup
Diffstat (limited to 'src/test/rustdoc')
| -rw-r--r-- | src/test/rustdoc/auxiliary/masked.rs | 20 | ||||
| -rw-r--r-- | src/test/rustdoc/masked.rs | 40 |
2 files changed, 60 insertions, 0 deletions
diff --git a/src/test/rustdoc/auxiliary/masked.rs b/src/test/rustdoc/auxiliary/masked.rs new file mode 100644 index 00000000000..e0d53a72220 --- /dev/null +++ b/src/test/rustdoc/auxiliary/masked.rs @@ -0,0 +1,20 @@ +// Copyright 2018 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 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#[derive(Clone)] +pub struct MaskedStruct; + +pub trait MaskedTrait { + fn masked_method(); +} + +impl MaskedTrait for String { + fn masked_method() {} +} diff --git a/src/test/rustdoc/masked.rs b/src/test/rustdoc/masked.rs new file mode 100644 index 00000000000..1f398da84e5 --- /dev/null +++ b/src/test/rustdoc/masked.rs @@ -0,0 +1,40 @@ +// Copyright 2018 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 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// aux-build:masked.rs + +#![feature(doc_masked)] + +#![crate_name = "foo"] + +#[doc(masked)] +extern crate masked; + +// @!has 'search-index.js' 'masked_method' + +// @!has 'foo/struct.String.html' 'MaskedTrait' +// @!has 'foo/struct.String.html' 'masked_method' +pub use std::string::String; + +// @!has 'foo/trait.Clone.html' 'MaskedStruct' +pub use std::clone::Clone; + +// @!has 'foo/struct.MyStruct.html' 'MaskedTrait' +// @!has 'foo/struct.MyStruct.html' 'masked_method' +pub struct MyStruct; + +impl masked::MaskedTrait for MyStruct { + fn masked_method() {} +} + +// @!has 'foo/trait.MyTrait.html' 'MaskedStruct' +pub trait MyTrait {} + +impl MyTrait for masked::MaskedStruct {} |
