Skip to content

Document attribute doc and its sub-language #7963

New issue

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

Closed
pnkfelix opened this issue Jul 22, 2013 · 2 comments · Fixed by #18376
Closed

Document attribute doc and its sub-language #7963

pnkfelix opened this issue Jul 22, 2013 · 2 comments · Fixed by #18376

Comments

@pnkfelix
Copy link
Member

Sub-bug of #6444. Almost certainly ties into documenting rustdoc itself.

@flaper87
Copy link
Contributor

triage bump, still missing

@burdges
Copy link

burdges commented Nov 30, 2016

It appears that doc comments placed inside macro_rules! blocks do not get macro substitutions.

In this example, we need the #[doc(hidden)] or else the doc comments do nothing at all, but even with that the doc comment contains an unsubstituted $f.

#[doc(hidden)]
macro_rules! my_wrapper{
    ($n:ident,$f:ident) =>{

/// Wrapper that calls `$f` before doing ...
struct $n<T> where T: ...;

impl<T> $n<T> where T: ... {
    ... make something call $f ...
}

    }
}

Is there a way convert identifiers into strings and concatenate them in attributes? Appears that stringify! does not work in an attribute.

dlrobertson pushed a commit to dlrobertson/rust that referenced this issue Nov 29, 2018
flip1995 pushed a commit to flip1995/rust that referenced this issue Nov 23, 2021
Use rustfmt version from `rust-toolchain`

changelog: None
flip1995 pushed a commit to flip1995/rust that referenced this issue Nov 23, 2021
Run rustfmt on batches of multiple files

changelog: none

This gives `cargo dev fmt` a nice speed boost, down from 90s (because old) on my laptop and 120s (because windows) on my desktop to ~5s on both

250 at a time was to give windows a good amount of headroom (failed at ~800, rust-lang#40384)

Also adds rustfmt to the toolchain file and has the clippy_dev workflow test using the pinned version as a follow up to rust-lang#7963
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants