blob: df2d22aa9b60ad8f0f32e23d74e0857601ee8fd4 [file] [log] [blame] [edit]
// This is yet another test to ensure that only macro calls are considered as such
// by the rustdoc highlighter.
// This is a regression test for <https://github.com/rust-lang/rust/issues/151904>.
#![crate_name = "foo"]
//@ has src/foo/macro-call.rs.html
//@ count - '//code/span[@class="macro"]' 2
//@ has - '//code/span[@class="macro"]' 'panic!'
//@ has - '//code/span[@class="macro"]' 'macro_rules!'
pub struct Layout;
impl Layout {
pub fn new<X: std::fmt::Debug>() {}
}
pub fn bar() {
let layout = Layout::new::<u32>();
if layout != Layout::new::<u32>() {
panic!();
}
let macro_rules = 3;
if macro_rules != 3 {}
}
macro_rules! blob {
() => {}
}