Rename buffer_lint_with_diagnostic to buffer_lint
This commit is contained in:
parent
c4f6502c6d
commit
98dd6c7e8f
28 changed files with 57 additions and 57 deletions
|
@ -1364,7 +1364,7 @@ fn pretty_printing_compatibility_hack(item: &Item, sess: &Session) -> bool {
|
|||
};
|
||||
|
||||
if crate_matches {
|
||||
sess.psess.buffer_lint_with_diagnostic(
|
||||
sess.psess.buffer_lint(
|
||||
PROC_MACRO_BACK_COMPAT,
|
||||
item.ident.span,
|
||||
ast::CRATE_NODE_ID,
|
||||
|
|
|
@ -258,7 +258,7 @@ impl<'a> StripUnconfigured<'a> {
|
|||
|
||||
// Lint on zero attributes in source.
|
||||
if expanded_attrs.is_empty() {
|
||||
self.sess.psess.buffer_lint_with_diagnostic(
|
||||
self.sess.psess.buffer_lint(
|
||||
rustc_lint_defs::builtin::UNUSED_ATTRIBUTES,
|
||||
attr.span,
|
||||
ast::CRATE_NODE_ID,
|
||||
|
@ -341,7 +341,7 @@ impl<'a> StripUnconfigured<'a> {
|
|||
item_span,
|
||||
);
|
||||
if attr.has_name(sym::crate_type) {
|
||||
self.sess.psess.buffer_lint_with_diagnostic(
|
||||
self.sess.psess.buffer_lint(
|
||||
rustc_lint_defs::builtin::DEPRECATED_CFG_ATTR_CRATE_TYPE_NAME,
|
||||
attr.span,
|
||||
ast::CRATE_NODE_ID,
|
||||
|
@ -349,7 +349,7 @@ impl<'a> StripUnconfigured<'a> {
|
|||
);
|
||||
}
|
||||
if attr.has_name(sym::crate_name) {
|
||||
self.sess.psess.buffer_lint_with_diagnostic(
|
||||
self.sess.psess.buffer_lint(
|
||||
rustc_lint_defs::builtin::DEPRECATED_CFG_ATTR_CRATE_TYPE_NAME,
|
||||
attr.span,
|
||||
ast::CRATE_NODE_ID,
|
||||
|
|
|
@ -1799,7 +1799,7 @@ impl<'a, 'b> InvocationCollector<'a, 'b> {
|
|||
}
|
||||
|
||||
if attr.is_doc_comment() {
|
||||
self.cx.sess.psess.buffer_lint_with_diagnostic(
|
||||
self.cx.sess.psess.buffer_lint(
|
||||
UNUSED_DOC_COMMENTS,
|
||||
current_span,
|
||||
self.cx.current_expansion.lint_node_id,
|
||||
|
@ -1810,7 +1810,7 @@ impl<'a, 'b> InvocationCollector<'a, 'b> {
|
|||
// `#[cfg]` and `#[cfg_attr]` are special - they are
|
||||
// eagerly evaluated.
|
||||
if attr_name != sym::cfg && attr_name != sym::cfg_attr {
|
||||
self.cx.sess.psess.buffer_lint_with_diagnostic(
|
||||
self.cx.sess.psess.buffer_lint(
|
||||
UNUSED_ATTRIBUTES,
|
||||
attr.span,
|
||||
self.cx.current_expansion.lint_node_id,
|
||||
|
|
|
@ -268,7 +268,7 @@ fn check_binders(
|
|||
// FIXME: Report this as a hard error eventually and remove equivalent errors from
|
||||
// `parse_tt_inner` and `nameize`. Until then the error may be reported twice, once
|
||||
// as a hard error and then once as a buffered lint.
|
||||
psess.buffer_lint_with_diagnostic(
|
||||
psess.buffer_lint(
|
||||
MISSING_FRAGMENT_SPECIFIER,
|
||||
span,
|
||||
node_id,
|
||||
|
@ -646,6 +646,6 @@ fn ops_is_prefix(
|
|||
fn buffer_lint(psess: &ParseSess, span: MultiSpan, node_id: NodeId, diag: BuiltinLintDiag) {
|
||||
// Macros loaded from other crates have dummy node ids.
|
||||
if node_id != DUMMY_NODE_ID {
|
||||
psess.buffer_lint_with_diagnostic(META_VARIABLE_MISUSE, span, node_id, diag);
|
||||
psess.buffer_lint(META_VARIABLE_MISUSE, span, node_id, diag);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ impl<'a> ParserAnyMacro<'a> {
|
|||
// but `m!()` is allowed in expression positions (cf. issue #34706).
|
||||
if kind == AstFragmentKind::Expr && parser.token == token::Semi {
|
||||
if is_local {
|
||||
parser.psess.buffer_lint_with_diagnostic(
|
||||
parser.psess.buffer_lint(
|
||||
SEMICOLON_IN_EXPRESSIONS_FROM_MACROS,
|
||||
parser.token.span,
|
||||
lint_node_id,
|
||||
|
@ -1153,7 +1153,7 @@ fn check_matcher_core<'tt>(
|
|||
name,
|
||||
Some(NonterminalKind::PatParam { inferred: false }),
|
||||
));
|
||||
sess.psess.buffer_lint_with_diagnostic(
|
||||
sess.psess.buffer_lint(
|
||||
RUST_2021_INCOMPATIBLE_OR_PATTERNS,
|
||||
span,
|
||||
ast::CRATE_NODE_ID,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue