1
Fork 0

Rename *note_without_error as *note.

Because the variant name in `Level` is `Note`, and the `without_error`
suffix is omitted in similar cases like `struct_allow` and
`struct_help`.
This commit is contained in:
Nicholas Nethercote 2023-11-30 14:01:35 +11:00
parent c3628bb970
commit 57d6f840b9
10 changed files with 25 additions and 45 deletions

View file

@ -648,10 +648,8 @@ fn is_empty_token_tree(sess: &ParseSess, seq: &mbe::SequenceRepetition) -> bool
iter.next();
}
let span = t.span.to(now.span);
sess.span_diagnostic.span_note_without_error(
span,
"doc comments are ignored in matcher position",
);
sess.span_diagnostic
.span_note(span, "doc comments are ignored in matcher position");
}
mbe::TokenTree::Sequence(_, sub_seq)
if (sub_seq.kleene.op == mbe::KleeneOp::ZeroOrMore

View file

@ -357,7 +357,7 @@ fn parse_sep_and_kleene_op<'a>(
fn span_dollar_dollar_or_metavar_in_the_lhs_err(sess: &ParseSess, token: &Token) {
sess.span_diagnostic
.span_err(token.span, format!("unexpected token: {}", pprust::token_to_string(token)));
sess.span_diagnostic.span_note_without_error(
sess.span_diagnostic.span_note(
token.span,
"`$$` and meta-variable expressions are not allowed inside macro parameter definitions",
);