##[derive(...)] and such before or after doc comments

3 messages · Page 1 of 1 (latest)

gloomy summit
#

So I've been unsure about this for a while and can't find anything about this online.

Should stuff like #[derive(...)] go before doc comments?

Like this


#[derive(Debug)]
/// This does... Something, I think. Could be wrong.
struct Tester; 

Or is it the other way around? Is there a consensus about this or am I just reading to much into it?

#

#[derive(...)] and such before or after doc comments

summer flax
#

I always put them below, but it doesn't really matter unless someone has a bad acting proc macro implementation