Reduce limit on macro_rules! diagnostic

This commit is contained in:
Jacob Pratt 2023-02-19 04:17:58 +00:00
parent 378c4ab9ab
commit 20282c1b20
No known key found for this signature in database
GPG key ID: 6E2E55C5F9ABB247

View file

@ -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(