diff options
| author | QuietMisdreavus <grey@quietmisdreavus.net> | 2017-08-21 20:20:21 -0500 |
|---|---|---|
| committer | QuietMisdreavus <grey@quietmisdreavus.net> | 2017-09-05 13:51:08 -0500 |
| commit | bb6de3c9ce1681ff1246c21d2a2ec537f331e258 (patch) | |
| tree | 726810d296d159d07a8435f1bab991b8e000c6fe /src/test | |
| parent | c491e195c467aa11e736457a6bc451e4fc214df6 (diff) | |
| download | rust-bb6de3c9ce1681ff1246c21d2a2ec537f331e258.tar.gz rust-bb6de3c9ce1681ff1246c21d2a2ec537f331e258.zip | |
add feature gate doc_masked and tests
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/feature-gate-doc_masked.rs | 14 | ||||
| -rw-r--r-- | src/test/rustdoc/doc-masked.rs | 29 |
2 files changed, 43 insertions, 0 deletions
diff --git a/src/test/compile-fail/feature-gate-doc_masked.rs b/src/test/compile-fail/feature-gate-doc_masked.rs new file mode 100644 index 00000000000..bb5be9d6971 --- /dev/null +++ b/src/test/compile-fail/feature-gate-doc_masked.rs @@ -0,0 +1,14 @@ +// Copyright 2017 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. + +#[doc(masked)] //~ ERROR: #[doc(masked)] is experimental +extern crate std as realstd; + +fn main() {} diff --git a/src/test/rustdoc/doc-masked.rs b/src/test/rustdoc/doc-masked.rs new file mode 100644 index 00000000000..78d32028e36 --- /dev/null +++ b/src/test/rustdoc/doc-masked.rs @@ -0,0 +1,29 @@ +// Copyright 2017 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. + +#![feature(doc_masked)] + +#![doc(masked)] +extern crate std as realstd; + +// @has doc_masked/struct.LocalStruct.html +// @has - '//*[@class="impl"]//code' 'impl LocalTrait for LocalStruct' +// @!has - '//*[@class="impl"]//code' 'impl Copy for LocalStruct' +#[derive(Copy, Clone)] +pub struct LocalStruct; + +// @has doc_masked/trait.LocalTrait.html +// @has - '//*[@id="implementors-list"]//code' 'impl LocalTrait for LocalStruct' +// @!has - '//*[@id="implementors-list"]//code' 'impl LocalTrait for usize' +pub trait LocalTrait { } + +impl LocalTrait for LocalStruct { } + +impl LocalTrait for usize { } |
