We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
concat!
stringify!
rust-analyzer version: 0.3.1489-standalone (bc78ebd 2023-04-23)
rustc version: 1.69.0 (84c898d65 2023-04-16)
I'm trying to use this method for generating dynamic doc within macros:
macro_rules! my_func { ($method:ident, $name:tt) => { #[doc = concat!("This is ", stringify!($name), ".")] pub fn $method() {} }; } my_func!(foo, "foo"); /// This documentation shows up. fn another() {} fn main() { foo(); another(); }
Notice the use of concat! and stringify! to generate the documentation dynamically.
Screenshot 1:
Screenshot 2:
The text was updated successfully, but these errors were encountered:
Duplicate of #8092
Sorry, something went wrong.
No branches or pull requests
rust-analyzer version: 0.3.1489-standalone (bc78ebd 2023-04-23)
rustc version: 1.69.0 (84c898d65 2023-04-16)
I'm trying to use this method for generating dynamic doc within macros:
Notice the use of
concat!
andstringify!
to generate the documentation dynamically.Screenshot 1:
Screenshot 2:
The text was updated successfully, but these errors were encountered: