diff --git a/crates/ruff_dev/src/generate_rules_table.rs b/crates/ruff_dev/src/generate_rules_table.rs index fdcdcacef23f4..c167c018d05c2 100644 --- a/crates/ruff_dev/src/generate_rules_table.rs +++ b/crates/ruff_dev/src/generate_rules_table.rs @@ -59,15 +59,11 @@ fn generate_table(table_out: &mut String, rules: impl IntoIterator, // If the message ends in a bracketed expression (like: "Use {replacement}"), escape the // brackets. Otherwise, it'll be interpreted as an HTML attribute via the `attr_list` // plugin. (Above, we'd convert to "Use {replacement\}".) - let message = if rule.is_removed() { - Cow::Owned("_This rule has been removed_".to_string()) + let message = rule.message_formats()[0]; + let message = if let Some(prefix) = message.strip_suffix('}') { + Cow::Owned(format!("{prefix}\\}}")) } else { - let message = rule.message_formats()[0]; - if let Some(prefix) = message.strip_suffix('}') { - Cow::Owned(format!("{prefix}\\}}")) - } else { - Cow::Borrowed(message) - } + Cow::Borrowed(message) }; // Start and end of style spans