rust/tests/rustdoc/intra-doc/link-to-proc-macro.rs
binarycat 871327e9c7 rustdoc: linking to a local proc macro no longer warns
fixes https://github.com/rust-lang/rust/issues/91274

Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2025-05-27 10:03:05 -05:00

14 lines
364 B
Rust

//@ compile-flags: --crate-type=proc-macro
//@ has 'foo/index.html' '//a[@href="macro.my_macro.html"]' 'my_macro'
//! Link to [`my_macro`].
#![crate_name = "foo"]
// regression test for https://github.com/rust-lang/rust/issues/91274
extern crate proc_macro;
#[proc_macro]
pub fn my_macro(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
input
}