Add rustX
check to codeblock attributes lint
This commit is contained in:
parent
fb32eb3529
commit
d3cb25f4cf
@ -1284,6 +1284,16 @@ fn parse(
|
||||
LangStringToken::LangToken(x) if x.starts_with("edition") => {
|
||||
data.edition = x[7..].parse::<Edition>().ok();
|
||||
}
|
||||
LangStringToken::LangToken(x)
|
||||
if x.starts_with("rust") && x[4..].parse::<Edition>().is_ok() =>
|
||||
{
|
||||
if let Some(extra) = extra {
|
||||
extra.error_invalid_codeblock_attr(format!(
|
||||
"unknown attribute `{x}`. Did you mean `edition{}`?",
|
||||
&x[4..]
|
||||
));
|
||||
}
|
||||
}
|
||||
LangStringToken::LangToken(x)
|
||||
if allow_error_code_check && x.starts_with('E') && x.len() == 5 =>
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user