Module vs Item in RBE

Hi -

I started reading RBE today and in print.html, I stumbled upon this statement:

In line 43, #[allow(dead_code)] is an attribute which only applies to the module after it.

And lines 43 and 44 are:

#[allow(dead_code)] // disable `dead_code` which warn against unused module
struct Structure(i32);

I have a bit of ADHD so I searched for the formal definition of a module in Rust, and if I am not mistaken, a struct is not a module, but an item (see grammar).

Is the word module used in RBE intentionally or is it a mistake?

Best regards.

You might want to keep an eye on rust-by-example#1954, assuming you aren't the one who opened it. I can't answer you for sure, but I suspect you're right that it isn't accurate to use "module" here.

That's crazy! No that's not me.