2024-02-27 10:40:12 -06:00
|
|
|
// We need this option to be enabled for the `foo` macro declaration to ensure
|
|
|
|
// that the link on the ident is not including whitespace characters.
|
|
|
|
|
|
|
|
//@ compile-flags: -Zunstable-options --generate-link-to-definition
|
|
|
|
#![crate_name = "foo"]
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'src/foo/source-code-highlight.rs.html'
|
2024-02-27 10:40:12 -06:00
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ hasraw - '<a href="../../foo/macro.foo.html">foo</a>'
|
2024-02-27 10:40:12 -06:00
|
|
|
#[macro_export]
|
|
|
|
macro_rules! foo {
|
|
|
|
() => {}
|
|
|
|
}
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ hasraw - '<span class="macro">foo!</span>'
|
2024-02-27 10:40:12 -06:00
|
|
|
foo! {}
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ hasraw - '<a href="../../foo/fn.f.html">f</a>'
|
2024-02-27 10:40:12 -06:00
|
|
|
#[rustfmt::skip]
|
|
|
|
pub fn f () {}
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ hasraw - '<a href="../../foo/struct.Bar.html">Bar</a>'
|
|
|
|
//@ hasraw - '<a href="../../foo/struct.Bar.html">Bar</a>'
|
|
|
|
//@ hasraw - '<a href="{{channel}}/std/primitive.u32.html">u32</a>'
|
2024-02-27 10:40:12 -06:00
|
|
|
#[rustfmt::skip]
|
|
|
|
pub struct Bar ( u32 );
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ hasraw - '<a href="../../foo/enum.Foo.html">Foo</a>'
|
2024-02-27 10:40:12 -06:00
|
|
|
pub enum Foo {
|
|
|
|
A,
|
|
|
|
}
|