@@ -1499,11 +1499,7 @@ impl TypeAliasBounds {
1499
1499
impl Visitor < ' _ > for WalkAssocTypes < ' _ > {
1500
1500
fn visit_qpath ( & mut self , qpath : & hir:: QPath < ' _ > , id : hir:: HirId , span : Span ) {
1501
1501
if TypeAliasBounds :: is_type_variable_assoc ( qpath) {
1502
- self . err . span_help (
1503
- span,
1504
- "use fully disambiguated paths (i.e., `<T as Trait>::Assoc`) to refer to \
1505
- associated types in type aliases",
1506
- ) ;
1502
+ self . err . span_help ( span, fluent:: lint:: builtin_type_alias_bounds_help) ;
1507
1503
}
1508
1504
intravisit:: walk_qpath ( self , qpath, id, span)
1509
1505
}
@@ -1547,11 +1543,11 @@ impl<'tcx> LateLintPass<'tcx> for TypeAliasBounds {
1547
1543
let mut suggested_changing_assoc_types = false ;
1548
1544
if !where_spans. is_empty ( ) {
1549
1545
cx. lint ( TYPE_ALIAS_BOUNDS , |lint| {
1550
- let mut err = lint. build ( "where clauses are not enforced in type aliases" ) ;
1546
+ let mut err = lint. build ( fluent :: lint :: builtin_type_alias_where_clause ) ;
1551
1547
err. set_span ( where_spans) ;
1552
1548
err. span_suggestion (
1553
1549
type_alias_generics. where_clause_span ,
1554
- "the clause will not be checked when the type alias is used, and should be removed" ,
1550
+ fluent :: lint :: suggestion ,
1555
1551
"" ,
1556
1552
Applicability :: MachineApplicable ,
1557
1553
) ;
@@ -1565,11 +1561,10 @@ impl<'tcx> LateLintPass<'tcx> for TypeAliasBounds {
1565
1561
1566
1562
if !inline_spans. is_empty ( ) {
1567
1563
cx. lint ( TYPE_ALIAS_BOUNDS , |lint| {
1568
- let mut err =
1569
- lint. build ( "bounds on generic parameters are not enforced in type aliases" ) ;
1564
+ let mut err = lint. build ( fluent:: lint:: builtin_type_alias_generic_bounds) ;
1570
1565
err. set_span ( inline_spans) ;
1571
1566
err. multipart_suggestion (
1572
- "the bound will not be checked when the type alias is used, and should be removed" ,
1567
+ fluent :: lint :: suggestion ,
1573
1568
inline_sugg,
1574
1569
Applicability :: MachineApplicable ,
1575
1570
) ;
0 commit comments