1 // compile-flags: -Zunstable-options --generate-link-to-definition
2 // aux-build:source_code.rs
7 extern crate source_code;
9 // @has 'src/foo/check-source-code-urls-to-def.rs.html'
11 // @has - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#1-17"]' 'bar'
12 #[path = "auxiliary/source-code-bar.rs"]
15 // @count - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#5-7"]' 4
17 // @has - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#13-17"]' 'self'
18 // @has - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#14-16"]' 'Trait'
19 use bar::sub::{self, Trait};
29 // @has - '//a/@href' '/struct.String.html'
30 // @has - '//a/@href' '/primitive.u32.html'
31 // @has - '//a/@href' '/primitive.str.html'
32 // @count - '//a[@href="../../src/foo/check-source-code-urls-to-def.rs.html#21"]' 5
33 // @has - '//a[@href="../../source_code/struct.SourceCode.html"]' 'source_code::SourceCode'
34 pub fn foo(a: u32, b: &str, c: String, d: Foo, e: bar::Bar, f: source_code::SourceCode) {
37 let z: Bar = bar::Bar { field: Foo };
39 // @has - '//a[@href="../../src/foo/check-source-code-urls-to-def.rs.html#24"]' 'hello'
43 // @has - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#14-16"]' 'bar::sub::Trait'
44 // @has - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#14-16"]' 'Trait'
45 pub fn foo2<T: bar::sub::Trait, V: Trait>(t: &T, v: &V, b: bool) {
48 // @has - '//a[@href="../../foo/primitive.bool.html"]' 'bool'
49 #[doc(primitive = "bool")]