]>
git.proxmox.com Git - rustc.git/blob - src/test/rustdoc/check-source-code-urls-to-def-std.rs
1 // compile-flags: -Zunstable-options --generate-link-to-definition
5 // @has 'src/foo/check-source-code-urls-to-def-std.rs.html'
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
) {
19 macro_rules
! yolo { () => {}
}
24 ($a
:ident
) => { bar($a) }
28 ($x
:expr
) => { $x * 2 }
31 pub fn another_foo() {
32 // This is known limitation: if the macro doesn't generate anything, the visitor
33 // can't find any item or anything that could tell us that it comes from expansion.
34 // @!has - '//a[@href="../../src/foo/check-source-code-urls-to-def-std.rs.html#19"]' 'yolo!'
36 // @has - '//a[@href="{{channel}}/std/macro.eprintln.html"]' 'eprintln!'
38 // @has - '//a[@href="../../src/foo/check-source-code-urls-to-def-std.rs.html#27-29"]' 'data!'
40 // @has - '//a[@href="../../src/foo/check-source-code-urls-to-def-std.rs.html#23-25"]' 'bar!'