You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#[diag("type parameter `{$param}` must be covered by another type when it appears before the first local type (`{$local_type}`)", code = E0210)]
1481
-
#[note(
1482
-
"implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type"
1483
-
)]
1484
-
pub(crate)structTyParamFirstLocal<'tcx>{
1485
-
#[primary_span]
1486
-
#[label(
1487
-
"type parameter `{$param}` must be covered by another type when it appears before the first local type (`{$local_type}`)"
1488
-
)]
1489
-
pubspan:Span,
1490
-
#[note(
1491
-
"in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last"
1492
-
)]
1493
-
pubnote:(),
1494
-
pubparam:Ident,
1495
-
publocal_type:Ty<'tcx>,
1496
-
}
1497
-
1498
-
#[derive(Diagnostic)]
1499
-
#[diag("type parameter `{$param}` must be covered by another type when it appears before the first local type (`{$local_type}`)", code = E0210)]
1500
-
#[note(
1501
-
"implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type"
1502
-
)]
1503
-
pub(crate)structTyParamFirstLocalLint<'tcx>{
1504
-
#[label(
1505
-
"type parameter `{$param}` must be covered by another type when it appears before the first local type (`{$local_type}`)"
1506
-
)]
1507
-
pubspan:Span,
1508
-
#[note(
1509
-
"in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last"
1510
-
)]
1511
-
pubnote:(),
1512
-
pubparam:Ident,
1513
-
publocal_type:Ty<'tcx>,
1514
-
}
1515
-
1516
-
#[derive(Diagnostic)]
1517
-
#[diag("type parameter `{$param}` must be used as the type parameter for some local type (e.g., `MyStruct<{$param}>`)", code = E0210)]
1518
-
#[note(
1519
-
"implementing a foreign trait is only possible if at least one of the types for which it is implemented is local"
1520
-
)]
1521
-
pub(crate)structTyParamSome{
1522
-
#[primary_span]
1523
-
#[label("type parameter `{$param}` must be used as the type parameter for some local type")]
1524
-
pubspan:Span,
1525
-
#[note("only traits defined in the current crate can be implemented for a type parameter")]
1526
-
pubnote:(),
1527
-
pubparam:Ident,
1528
-
}
1529
-
1530
-
#[derive(Diagnostic)]
1531
-
#[diag("type parameter `{$param}` must be used as the type parameter for some local type (e.g., `MyStruct<{$param}>`)", code = E0210)]
1532
-
#[note(
1533
-
"implementing a foreign trait is only possible if at least one of the types for which it is implemented is local"
1534
-
)]
1535
-
pub(crate)structTyParamSomeLint{
1536
-
#[label("type parameter `{$param}` must be used as the type parameter for some local type")]
1537
-
pubspan:Span,
1538
-
#[note("only traits defined in the current crate can be implemented for a type parameter")]
1539
-
pubnote:(),
1540
-
pubparam:Ident,
1541
-
}
1542
-
1543
1477
#[derive(Diagnostic)]
1544
1478
pub(crate)enumOnlyCurrentTraits{
1545
1479
#[diag("only traits defined in the current crate can be implemented for types defined outside of the crate", code = E0117)]
0 commit comments