]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/inline_cross/assoc-items.rs
rustdoc: Fix issues with cross-crate inlined associated items
[rust.git] / src / test / rustdoc / inline_cross / assoc-items.rs
1 // Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 // aux-build:assoc-items.rs
12 // build-aux-docs
13 // ignore-cross-compile
14
15 #![crate_name = "foo"]
16
17 extern crate assoc_items;
18
19 // @has foo/struct.MyStruct.html
20 // @!has - 'PrivateConst'
21 // @has - '//*[@id="associatedconstant.PublicConst"]' 'pub const PublicConst: u8'
22 // @has - '//*[@class="docblock"]' 'PublicConst: u8 = 123'
23 // @has - '//*[@class="docblock"]' 'docs for PublicConst'
24 // @!has - 'private_method'
25 // @has - '//*[@id="method.public_method"]' 'pub fn public_method()'
26 // @has - '//*[@class="docblock"]' 'docs for public_method'
27 // @has - '//*[@id="associatedconstant.ConstNoDefault"]' 'const ConstNoDefault: i16'
28 // @has - '//*[@class="docblock"]' 'ConstNoDefault: i16 = -123'
29 // @has - '//*[@class="docblock"]' 'dox for ConstNoDefault'
30 // @has - '//*[@id="associatedconstant.ConstWithDefault"]' 'const ConstWithDefault: u16'
31 // @has - '//*[@class="docblock"]' 'ConstWithDefault: u16 = 12345'
32 // @has - '//*[@class="docblock"]' 'docs for ConstWithDefault'
33 // @has - '//*[@id="associatedtype.TypeNoDefault"]' 'type TypeNoDefault = i32'
34 // @has - '//*[@class="docblock"]' 'dox for TypeNoDefault'
35 // @has - '//*[@id="associatedtype.TypeWithDefault"]' 'type TypeWithDefault = u32'
36 // @has - '//*[@class="docblock"]' 'docs for TypeWithDefault'
37 // @has - '//*[@id="method.method_no_default"]' 'fn method_no_default()'
38 // @has - '//*[@class="docblock"]' 'dox for method_no_default'
39 // @has - '//*[@id="method.method_with_default"]' 'fn method_with_default()'
40 // @has - '//*[@class="docblock"]' 'docs for method_with_default'
41 pub use assoc_items::MyStruct;
42
43 // @has foo/trait.MyTrait.html
44 // @has - '//*[@id="associatedconstant.ConstNoDefault"]' 'const ConstNoDefault: i16'
45 // @has - '//*[@class="docblock"]' 'docs for ConstNoDefault'
46 // @has - '//*[@id="associatedconstant.ConstWithDefault"]' 'const ConstWithDefault: u16'
47 // @has - '//*[@class="docblock"]' 'ConstWithDefault: u16 = 12345'
48 // @has - '//*[@class="docblock"]' 'docs for ConstWithDefault'
49 // @has - '//*[@id="associatedtype.TypeNoDefault"]' 'type TypeNoDefault'
50 // @has - '//*[@class="docblock"]' 'docs for TypeNoDefault'
51 // @has - '//*[@id="associatedtype.TypeWithDefault"]' 'type TypeWithDefault = u32'
52 // @has - '//*[@class="docblock"]' 'docs for TypeWithDefault'
53 // @has - '//*[@id="tymethod.method_no_default"]' 'fn method_no_default()'
54 // @has - '//*[@class="docblock"]' 'docs for method_no_default'
55 // @has - '//*[@id="method.method_with_default"]' 'fn method_with_default()'
56 // @has - '//*[@class="docblock"]' 'docs for method_with_default'
57 pub use assoc_items::MyTrait;