#[allow(unused)]
impl Profile {
const CIRCLE: u8 = 0x00;
const SQUARE: u8 = 0x01;
...
}
We all know this case, the huge list of constants for compatibility with something else, with some constants unused but retained for completeness.
#[allow(unused)] suppresses messages for unused constants, but allowing all "unused" is too big a hammer for general use. "Unused" is supposedly all of unused_imports, unused_variables, unused_assignments, dead_code, unused_mut, unreachable_code, unused_must_use, unused_unsafe, path_statements, unused_attributes. Don't want to suppress all that for the entire impl section.
"Unused_variable" doesn't suppress warnings for constants. There doesn't seem to be an #[allow(unused_constants)].
There must be a proper way to do this. It's such a common case.