@@ -1049,7 +1049,7 @@ fn two_suggestions_same_span() {
1049
1049
. element ( Snippet :: source ( source) . annotation ( AnnotationKind :: Primary . span ( 4 ..5 ) ) ) ,
1050
1050
Group :: with_title (
1051
1051
Level :: HELP
1052
- . primary_title ( "you might have meant to use one of the following enum variants" ) ,
1052
+ . secondary_title ( "you might have meant to use one of the following enum variants" ) ,
1053
1053
)
1054
1054
. element ( Snippet :: source ( source) . patch ( Patch :: new ( 4 ..5 , "(A::Tuple())" ) ) )
1055
1055
. element ( Snippet :: source ( source) . patch ( Patch :: new ( 4 ..5 , "A::Unit" ) ) ) ,
@@ -1112,7 +1112,7 @@ fn main() {
1112
1112
. label ( "method not found in `Chaenomeles`" ) ,
1113
1113
) ,
1114
1114
) ,
1115
- Group :: with_title ( Level :: HELP . primary_title (
1115
+ Group :: with_title ( Level :: HELP . secondary_title (
1116
1116
"the following traits which provide `pick` are implemented but not in scope; perhaps you want to import one of them" ,
1117
1117
) )
1118
1118
. element (
@@ -1160,7 +1160,7 @@ fn single_line_non_overlapping_suggestions() {
1160
1160
. line_start ( 1 )
1161
1161
. annotation ( AnnotationKind :: Primary . span ( 4 ..5 ) ) ,
1162
1162
) ,
1163
- Group :: with_title ( Level :: HELP . primary_title ( "make these changes and things will work" ) )
1163
+ Group :: with_title ( Level :: HELP . secondary_title ( "make these changes and things will work" ) )
1164
1164
. element (
1165
1165
Snippet :: source ( source)
1166
1166
. patch ( Patch :: new ( 4 ..5 , "(A::Tuple())" ) )
@@ -1198,7 +1198,7 @@ fn single_line_non_overlapping_suggestions2() {
1198
1198
. line_start ( 1 )
1199
1199
. annotation ( AnnotationKind :: Primary . span ( 4 ..18 ) ) ,
1200
1200
) ,
1201
- Group :: with_title ( Level :: HELP . primary_title ( "make these changes and things will work" ) )
1201
+ Group :: with_title ( Level :: HELP . secondary_title ( "make these changes and things will work" ) )
1202
1202
. element (
1203
1203
Snippet :: source ( source)
1204
1204
. patch ( Patch :: new ( 4 ..18 , "(A::Tuple())" ) )
@@ -1266,7 +1266,7 @@ fn multiple_replacements() {
1266
1266
) ,
1267
1267
Group :: with_title (
1268
1268
Level :: HELP
1269
- . primary_title ( "try explicitly pass `&Self` into the Closure as an argument" ) ,
1269
+ . secondary_title ( "try explicitly pass `&Self` into the Closure as an argument" ) ,
1270
1270
)
1271
1271
. element (
1272
1272
Snippet :: source ( source)
@@ -1340,7 +1340,7 @@ fn main() {
1340
1340
. label ( "first borrow later used here" ) ,
1341
1341
) ,
1342
1342
) ,
1343
- Group :: with_title ( Level :: HELP . primary_title (
1343
+ Group :: with_title ( Level :: HELP . secondary_title (
1344
1344
"if you want to call `next` on a iterator within the loop, consider using `while let`" ,
1345
1345
) )
1346
1346
. element (
@@ -1409,13 +1409,15 @@ fn main() {}"#;
1409
1409
) ,
1410
1410
) ,
1411
1411
Group :: with_title (
1412
- Level :: HELP . primary_title ( "there is a crate or module with a similar name" ) ,
1412
+ Level :: HELP . secondary_title ( "there is a crate or module with a similar name" ) ,
1413
1413
)
1414
1414
. element ( Snippet :: source ( source) . patch ( Patch :: new ( 122 ..124 , "std" ) ) ) ,
1415
- Group :: with_title ( Level :: HELP . primary_title ( "consider importing this module" ) )
1415
+ Group :: with_title ( Level :: HELP . secondary_title ( "consider importing this module" ) )
1416
1416
. element ( Snippet :: source ( source) . patch ( Patch :: new ( 1 ..1 , "use std::cell;\n " ) ) ) ,
1417
- Group :: with_title ( Level :: HELP . primary_title ( "if you import `cell`, refer to it directly" ) )
1418
- . element ( Snippet :: source ( source) . patch ( Patch :: new ( 122 ..126 , "" ) ) ) ,
1417
+ Group :: with_title (
1418
+ Level :: HELP . secondary_title ( "if you import `cell`, refer to it directly" ) ,
1419
+ )
1420
+ . element ( Snippet :: source ( source) . patch ( Patch :: new ( 122 ..126 , "" ) ) ) ,
1419
1421
] ;
1420
1422
let expected = str![ [ r#"
1421
1423
error[E0433]: failed to resolve: use of undeclared crate or module `st`
@@ -1482,7 +1484,7 @@ fn main() {}"#;
1482
1484
. label ( "this type parameter needs to be `Sized`" ) ,
1483
1485
) ,
1484
1486
) ,
1485
- Group :: with_title ( Level :: HELP . primary_title (
1487
+ Group :: with_title ( Level :: HELP . secondary_title (
1486
1488
"consider removing the `?Sized` bound to make the type parameter `Sized`" ,
1487
1489
) )
1488
1490
. element ( Snippet :: source ( source) . patch ( Patch :: new ( 52 ..85 , "" ) ) ) ,
@@ -1543,7 +1545,7 @@ fn main() {}"#;
1543
1545
) )
1544
1546
, Group :: with_title (
1545
1547
Level :: NOTE
1546
- . primary_title ( "required by an implicit `Sized` bound in `Wrapper`" )
1548
+ . secondary_title ( "required by an implicit `Sized` bound in `Wrapper`" )
1547
1549
) . element (
1548
1550
Snippet :: source ( source)
1549
1551
. line_start ( 1 )
@@ -1556,7 +1558,7 @@ fn main() {}"#;
1556
1558
)
1557
1559
) , Group :: with_title (
1558
1560
Level :: HELP
1559
- . primary_title ( "you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`" )
1561
+ . secondary_title ( "you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`" )
1560
1562
)
1561
1563
. element (
1562
1564
Snippet :: source ( source)
@@ -1576,7 +1578,7 @@ fn main() {}"#;
1576
1578
1577
1579
) , Group :: with_title (
1578
1580
Level :: HELP
1579
- . primary_title ( "consider removing the `?Sized` bound to make the type parameter `Sized`" )
1581
+ . secondary_title ( "consider removing the `?Sized` bound to make the type parameter `Sized`" )
1580
1582
) . element (
1581
1583
Snippet :: source ( source)
1582
1584
@@ -1640,7 +1642,7 @@ zappy
1640
1642
. id ( "E0277" ) ,
1641
1643
) ,
1642
1644
// We need an empty group here to ensure the HELP line is rendered correctly
1643
- Group :: with_title ( Level :: HELP . primary_title (
1645
+ Group :: with_title ( Level :: HELP . secondary_title (
1644
1646
"consider removing the `?Sized` bound to make the type parameter `Sized`" ,
1645
1647
) )
1646
1648
. element (
@@ -1713,7 +1715,7 @@ fn main() {
1713
1715
. span ( 208 ..510 )
1714
1716
. label ( "type mismatch resolving `<Result<Result<(), Result<Result<(), ...>, ...>>, ...> as Future>::Error == Foo`" ) ,
1715
1717
) ) , Group :: with_title (
1716
- Level :: NOTE . primary_title ( "expected this to be `Foo`" )
1718
+ Level :: NOTE . secondary_title ( "expected this to be `Foo`" )
1717
1719
) . element (
1718
1720
Snippet :: source ( source)
1719
1721
. line_start ( 4 )
@@ -1799,7 +1801,7 @@ fn main() {
1799
1801
. span ( 208 ..510 )
1800
1802
. label ( "type mismatch resolving `<Result<Result<(), Result<Result<(), ...>, ...>>, ...> as Future>::Error == Foo`" ) ,
1801
1803
) ) , Group :: with_title (
1802
- Level :: NOTE . primary_title ( "expected this to be `Foo`" )
1804
+ Level :: NOTE . secondary_title ( "expected this to be `Foo`" )
1803
1805
) . element (
1804
1806
Snippet :: source ( source)
1805
1807
. line_start ( 4 )
@@ -2045,7 +2047,7 @@ fn main() {
2045
2047
. message ( "expected fn pointer `for<'a> fn(Box<(dyn Any + Send + 'a)>) -> Pin<_>`\n found fn item `fn(Box<(dyn Any + Send + 'static)>) -> Pin<_> {wrapped_fn}`" )
2046
2048
,
2047
2049
) , Group :: with_title (
2048
- Level :: NOTE . primary_title ( "function defined here" ) ,
2050
+ Level :: NOTE . secondary_title ( "function defined here" ) ,
2049
2051
) . element (
2050
2052
Snippet :: source ( source)
2051
2053
. line_start ( 7 )
@@ -2322,7 +2324,7 @@ fn main() {
2322
2324
Level :: NOTE . message ( "string concatenation requires an owned `String` on the left" ) ,
2323
2325
) ,
2324
2326
Group :: with_title (
2325
- Level :: HELP . primary_title ( "create an owned `String` from a string reference" ) ,
2327
+ Level :: HELP . secondary_title ( "create an owned `String` from a string reference" ) ,
2326
2328
)
2327
2329
. element (
2328
2330
Snippet :: source ( source)
@@ -2390,7 +2392,7 @@ fn foo() {
2390
2392
2391
2393
. annotation ( AnnotationKind :: Primary . span ( 136 ..160 ) ) ,
2392
2394
) ,
2393
- Group :: with_title ( Level :: NOTE . primary_title ( "byte `193` is not valid utf-8" ) )
2395
+ Group :: with_title ( Level :: NOTE . secondary_title ( "byte `193` is not valid utf-8" ) )
2394
2396
. element (
2395
2397
Snippet :: source ( bin_source)
2396
2398
. path ( "$DIR/not-utf8.bin" )
@@ -2581,7 +2583,7 @@ fn main() {
2581
2583
Group :: with_title (
2582
2584
Level :: HELP
2583
2585
. with_name ( Some ( "suggestion" ) )
2584
- . primary_title ( "use `break` on its own without a value inside this `while` loop" )
2586
+ . secondary_title ( "use `break` on its own without a value inside this `while` loop" )
2585
2587
. id ( "S0123" ) ,
2586
2588
)
2587
2589
. element (
@@ -2725,15 +2727,16 @@ fn main() {
2725
2727
. element ( Level :: NOTE . message ( long_title2) )
2726
2728
. element ( Level :: NOTE . message ( "`#[warn(array_into_iter)]` on by default" ) ) ,
2727
2729
Group :: with_title (
2728
- Level :: HELP . primary_title ( "use `.iter()` instead of `.into_iter()` to avoid ambiguity" ) ,
2730
+ Level :: HELP
2731
+ . secondary_title ( "use `.iter()` instead of `.into_iter()` to avoid ambiguity" ) ,
2729
2732
)
2730
2733
. element (
2731
2734
Snippet :: source ( suggestion_source)
2732
2735
. path ( "lint_example.rs" )
2733
2736
. line_start ( 3 )
2734
2737
. patch ( Patch :: new ( 10 ..19 , "iter" ) ) ,
2735
2738
) ,
2736
- Group :: with_title ( Level :: HELP . primary_title ( long_title3) ) . element (
2739
+ Group :: with_title ( Level :: HELP . secondary_title ( long_title3) ) . element (
2737
2740
Snippet :: source ( suggestion_source)
2738
2741
. path ( "lint_example.rs" )
2739
2742
. line_start ( 3 )
@@ -2794,15 +2797,16 @@ fn main() {
2794
2797
. element ( Level :: NOTE . message ( long_title2) )
2795
2798
. element ( Level :: NOTE . message ( "`#[warn(array_into_iter)]` on by default" ) ) ,
2796
2799
Group :: with_title (
2797
- Level :: HELP . primary_title ( "use `.iter()` instead of `.into_iter()` to avoid ambiguity" ) ,
2800
+ Level :: HELP
2801
+ . secondary_title ( "use `.iter()` instead of `.into_iter()` to avoid ambiguity" ) ,
2798
2802
)
2799
2803
. element (
2800
2804
Snippet :: source ( suggestion_source)
2801
2805
. path ( "lint_example.rs" )
2802
2806
. line_start ( 3 )
2803
2807
. patch ( Patch :: new ( 10 ..19 , "iter" ) ) ,
2804
2808
) ,
2805
- Group :: with_title ( Level :: HELP . primary_title ( long_title3) ) . element (
2809
+ Group :: with_title ( Level :: HELP . secondary_title ( long_title3) ) . element (
2806
2810
Snippet :: source ( suggestion_source)
2807
2811
. path ( "lint_example.rs" )
2808
2812
. line_start ( 3 )
@@ -2979,7 +2983,7 @@ fn main() {}
2979
2983
) ) ,
2980
2984
)
2981
2985
. element ( Padding ) ,
2982
- Group :: with_title ( Level :: HELP . primary_title ( "consider specifying the generic argument" ) )
2986
+ Group :: with_title ( Level :: HELP . secondary_title ( "consider specifying the generic argument" ) )
2983
2987
. element (
2984
2988
Snippet :: source ( source)
2985
2989
. path ( "$DIR/issue-42234-unknown-receiver-type.rs" )
@@ -3055,7 +3059,7 @@ fn main() {}
3055
3059
"cannot infer type of the type parameter `S` declared on the method `sum`" ,
3056
3060
) ) ,
3057
3061
) ,
3058
- Group :: with_title ( Level :: HELP . primary_title ( "consider specifying the generic argument" ) )
3062
+ Group :: with_title ( Level :: HELP . secondary_title ( "consider specifying the generic argument" ) )
3059
3063
. element (
3060
3064
Snippet :: source ( source)
3061
3065
. path ( "$DIR/issue-42234-unknown-receiver-type.rs" )
0 commit comments