mirror of
https://github.com/rust-lang/rust
synced 2024-10-01 22:34:35 +00:00
Reduce limit on macro_rules!
diagnostic
This commit is contained in:
parent
378c4ab9ab
commit
20282c1b20
|
@ -459,7 +459,7 @@ fn parse_item_macro(&mut self, vis: &Visibility) -> PResult<'a, MacCall> {
|
|||
// Maybe the user misspelled `macro_rules` (issue #91227)
|
||||
if self.token.is_ident()
|
||||
&& path.segments.len() == 1
|
||||
&& edit_distance("macro_rules", &path.segments[0].ident.to_string(), 3)
|
||||
&& edit_distance("macro_rules", &path.segments[0].ident.to_string(), 2)
|
||||
.is_some()
|
||||
{
|
||||
err.span_suggestion(
|
||||
|
|
Loading…
Reference in a new issue