]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/check-source-code-urls-to-def-std.rs
rustdoc-json: Make the `fns/generics.rs` test much more robust
[rust.git] / src / test / rustdoc / check-source-code-urls-to-def-std.rs
1 // compile-flags: -Zunstable-options --generate-link-to-definition
2
3 #![crate_name = "foo"]
4
5 // @has 'src/foo/check-source-code-urls-to-def-std.rs.html'
6
7 fn babar() {}
8
9 // @has - '//a[@href="{{channel}}/std/primitive.u32.html"]' 'u32'
10 // @has - '//a[@href="{{channel}}/std/primitive.str.html"]' 'str'
11 // @has - '//a[@href="{{channel}}/std/primitive.bool.html"]' 'bool'
12 // @has - '//a[@href="../../src/foo/check-source-code-urls-to-def-std.rs.html#7"]' 'babar'
13 pub fn foo(a: u32, b: &str, c: String) {
14     let x = 12;
15     let y: bool = true;
16     babar();
17 }