@@ -27,7 +27,6 @@ use std::ops::{Deref, DerefMut};
2727use thin_vec:: thin_vec;
2828
2929use crate :: errors;
30- use crate :: fluent_generated as fluent;
3130
3231/// Is `self` allowed semantically as the first parameter in an `FnDecl`?
3332enum SelfSemantic {
@@ -766,11 +765,10 @@ impl<'a> AstValidator<'a> {
766765 . span_to_snippet ( span)
767766 . is_ok_and ( |snippet| !snippet. starts_with ( "#[" ) )
768767 {
769- self . lint_buffer . buffer_lint_with_diagnostic (
768+ self . lint_buffer . buffer_lint (
770769 MISSING_ABI ,
771770 id,
772771 span,
773- fluent:: ast_passes_extern_without_abi,
774772 BuiltinLintDiag :: MissingAbi ( span, abi:: Abi :: FALLBACK ) ,
775773 )
776774 }
@@ -1428,17 +1426,15 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
14281426 Self :: check_decl_no_pat ( & sig. decl , |span, ident, mut_ident| {
14291427 if mut_ident && matches ! ( ctxt, FnCtxt :: Assoc ( _) ) {
14301428 if let Some ( ident) = ident {
1431- let msg = match ctxt {
1432- FnCtxt :: Foreign => fluent:: ast_passes_pattern_in_foreign,
1433- _ => fluent:: ast_passes_pattern_in_bodiless,
1434- } ;
1435- let diag = BuiltinLintDiag :: PatternsInFnsWithoutBody ( span, ident) ;
1436- self . lint_buffer . buffer_lint_with_diagnostic (
1429+ self . lint_buffer . buffer_lint (
14371430 PATTERNS_IN_FNS_WITHOUT_BODY ,
14381431 id,
14391432 span,
1440- msg,
1441- diag,
1433+ BuiltinLintDiag :: PatternsInFnsWithoutBody {
1434+ span,
1435+ ident,
1436+ is_foreign : matches ! ( ctxt, FnCtxt :: Foreign ) ,
1437+ } ,
14421438 )
14431439 }
14441440 } else {
@@ -1510,12 +1506,11 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
15101506 Some ( ( right, snippet) )
15111507 }
15121508 } ;
1513- self . lint_buffer . buffer_lint_with_diagnostic (
1509+ self . lint_buffer . buffer_lint (
15141510 DEPRECATED_WHERE_CLAUSE_LOCATION ,
15151511 item. id ,
15161512 err. span ,
1517- fluent:: ast_passes_deprecated_where_clause_location,
1518- BuiltinLintDiag :: DeprecatedWhereclauseLocation ( sugg) ,
1513+ BuiltinLintDiag :: DeprecatedWhereclauseLocation ( err. span , sugg) ,
15191514 ) ;
15201515 }
15211516
0 commit comments