Closed antoyo closed 3 years ago
@zzeroo: If we compile with:
cargo rustc --profile=check -- -Zunstable-options --pretty=expanded
we can see the generated code and why this causes an issue:
impl ::relm::DisplayVariant for Msg {
#[allow(unused_qualifications)]
fn display_variant(&self) -> &'static str {
match *self
{
#[doc = " Comment."]
Msg::Decrement { .. } => "Decrement",
Msg::Increment { .. } => "Increment",
Msg::Quit { .. } => "Quit",
}
}
}
We see a useless doc-comment on a pattern.
This is most likely caused by this line.
~If I did that, it's probably for a reason, though I don't remember it.~ Edit: I remember now: it's to allow the usage of #[cfg(test)]
to have a message only used in tests.
~Maybe you could try removing this attribute to see if it generates an error in the tests.~ Edit: This should generate errors in tests.
We probably just need to filter the attributes to remove the ones with the name doc
.