@@ -27,7 +27,6 @@ use std::ops::{Deref, DerefMut};
27
27
use thin_vec:: thin_vec;
28
28
29
29
use crate :: errors;
30
- use crate :: fluent_generated as fluent;
31
30
32
31
/// Is `self` allowed semantically as the first parameter in an `FnDecl`?
33
32
enum SelfSemantic {
@@ -766,11 +765,10 @@ impl<'a> AstValidator<'a> {
766
765
. span_to_snippet ( span)
767
766
. is_ok_and ( |snippet| !snippet. starts_with ( "#[" ) )
768
767
{
769
- self . lint_buffer . buffer_lint_with_diagnostic (
768
+ self . lint_buffer . buffer_lint (
770
769
MISSING_ABI ,
771
770
id,
772
771
span,
773
- fluent:: ast_passes_extern_without_abi,
774
772
BuiltinLintDiag :: MissingAbi ( span, abi:: Abi :: FALLBACK ) ,
775
773
)
776
774
}
@@ -1428,17 +1426,15 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
1428
1426
Self :: check_decl_no_pat ( & sig. decl , |span, ident, mut_ident| {
1429
1427
if mut_ident && matches ! ( ctxt, FnCtxt :: Assoc ( _) ) {
1430
1428
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 (
1437
1430
PATTERNS_IN_FNS_WITHOUT_BODY ,
1438
1431
id,
1439
1432
span,
1440
- msg,
1441
- diag,
1433
+ BuiltinLintDiag :: PatternsInFnsWithoutBody {
1434
+ span,
1435
+ ident,
1436
+ is_foreign : matches ! ( ctxt, FnCtxt :: Foreign ) ,
1437
+ } ,
1442
1438
)
1443
1439
}
1444
1440
} else {
@@ -1510,12 +1506,11 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
1510
1506
Some ( ( right, snippet) )
1511
1507
}
1512
1508
} ;
1513
- self . lint_buffer . buffer_lint_with_diagnostic (
1509
+ self . lint_buffer . buffer_lint (
1514
1510
DEPRECATED_WHERE_CLAUSE_LOCATION ,
1515
1511
item. id ,
1516
1512
err. span ,
1517
- fluent:: ast_passes_deprecated_where_clause_location,
1518
- BuiltinLintDiag :: DeprecatedWhereclauseLocation ( sugg) ,
1513
+ BuiltinLintDiag :: DeprecatedWhereclauseLocation ( err. span , sugg) ,
1519
1514
) ;
1520
1515
}
1521
1516
0 commit comments