diff options
| author | bors <bors@rust-lang.org> | 2018-08-04 21:20:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-08-04 21:20:26 +0000 |
| commit | 667fdc1ce49aa5be2a11bf565f27f8118bd7c4d3 (patch) | |
| tree | f2a55c16f49a75de4df6be3d5e733b2cbd18adf4 /src/test/rustdoc | |
| parent | 94c3c340cce53396d23a20b236fa94f1d34b6df7 (diff) | |
| parent | d57f3a61c4721506d7fb33cc949cd640d13c939a (diff) | |
Auto merge of #52827 - GuillaumeGomez:generic-impls, r=QuietMisdreavus
rustdoc: clean up generic impls r? @QuietMisdreavus
Diffstat (limited to 'src/test/rustdoc')
| -rw-r--r-- | src/test/rustdoc/generic-impl.rs | 1 | ||||
| -rw-r--r-- | src/test/rustdoc/primitive-generic-impl.rs | 18 | ||||
| -rw-r--r-- | src/test/rustdoc/primitive/primitive-generic-impl.rs | 13 |
3 files changed, 32 insertions, 0 deletions
diff --git a/src/test/rustdoc/generic-impl.rs b/src/test/rustdoc/generic-impl.rs index e2665fd8f37..46e02ed08e0 100644 --- a/src/test/rustdoc/generic-impl.rs +++ b/src/test/rustdoc/generic-impl.rs @@ -17,6 +17,7 @@ pub struct Bar; // @has foo/struct.Foo.html '//h3[@id="impl-ToString"]//code' 'impl<T> ToString for T' pub struct Foo; +// @has foo/struct.Foo.html '//div[@class="sidebar-links"]/a[@href="#impl-ToString"]' 'ToString' impl fmt::Display for Foo { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { diff --git a/src/test/rustdoc/primitive-generic-impl.rs b/src/test/rustdoc/primitive-generic-impl.rs new file mode 100644 index 00000000000..b4351b8268c --- /dev/null +++ b/src/test/rustdoc/primitive-generic-impl.rs @@ -0,0 +1,18 @@ +// 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. + +#![crate_name = "foo"] + +// we need to reexport something from libstd so that `all_trait_implementations` is called. +pub use std::string::String; + +include!("primitive/primitive-generic-impl.rs"); + +// @has foo/primitive.i32.html '//h3[@id="impl-ToString"]//code' 'impl<T> ToString for T' diff --git a/src/test/rustdoc/primitive/primitive-generic-impl.rs b/src/test/rustdoc/primitive/primitive-generic-impl.rs new file mode 100644 index 00000000000..1ac1fc95338 --- /dev/null +++ b/src/test/rustdoc/primitive/primitive-generic-impl.rs @@ -0,0 +1,13 @@ +// 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. + +#[doc(primitive = "i32")] +/// Some useless docs, wouhou! +mod i32 {} |
