File tree Expand file tree Collapse file tree 3 files changed +12
-10
lines changed Expand file tree Collapse file tree 3 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ def foobar(door, bar={}):
14
14
. fold ( false )
15
15
. annotation ( AnnotationKind :: Primary . span ( 56 ..58 ) . label ( "B006" ) ) ,
16
16
)
17
- . element ( Level :: HELP . title ( "Replace with `None`; initialize within function" ) ) ] ;
17
+ . element ( Level :: HELP . message ( "Replace with `None`; initialize within function" ) ) ] ;
18
18
19
19
let renderer = Renderer :: styled ( ) ;
20
20
anstream:: println!( "{}" , renderer. render( message) ) ;
Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ error:
199
199
#[ test]
200
200
fn test_format_footer_title ( ) {
201
201
let input = & [ Group :: with_title ( Level :: ERROR . title ( "" ) )
202
- . element ( Level :: ERROR . title ( "This __is__ a title" ) ) ] ;
202
+ . element ( Level :: ERROR . message ( "This __is__ a title" ) ) ] ;
203
203
let expected = str![ [ r#"
204
204
error:
205
205
|
@@ -2258,7 +2258,9 @@ fn main() {
2258
2258
. label ( "`+` cannot be used to concatenate two `&str` strings" ) ,
2259
2259
) ,
2260
2260
)
2261
- . element ( Level :: NOTE . title ( "string concatenation requires an owned `String` on the left" ) ) ,
2261
+ . element (
2262
+ Level :: NOTE . message ( "string concatenation requires an owned `String` on the left" ) ,
2263
+ ) ,
2262
2264
Group :: with_title ( Level :: HELP . title ( "create an owned `String` from a string reference" ) )
2263
2265
. element (
2264
2266
Snippet :: source ( source)
@@ -2333,7 +2335,7 @@ fn foo() {
2333
2335
2334
2336
. annotation ( AnnotationKind :: Primary . span ( 0 ..0 ) ) ,
2335
2337
)
2336
- . element ( Level :: NOTE . title ( "this error originates in the macro `include` (in Nightly builds, run with -Z macro-backtrace for more info)" ) ) ,
2338
+ . element ( Level :: NOTE . message ( "this error originates in the macro `include` (in Nightly builds, run with -Z macro-backtrace for more info)" ) ) ,
2337
2339
] ;
2338
2340
2339
2341
let expected_ascii = str![ [ r#"
Original file line number Diff line number Diff line change @@ -1659,8 +1659,8 @@ fn main() {}
1659
1659
. annotation ( AnnotationKind :: Context . span ( 878 ..880 ) . label ( "not covered" ) )
1660
1660
. annotation ( AnnotationKind :: Context . span ( 890 ..892 ) . label ( "not covered" ) )
1661
1661
)
1662
- . element ( Level :: NOTE . title ( "the matched value is of type `NonEmptyEnum5`" ) )
1663
- . element ( Level :: NOTE . title ( "match arms with guards don't count towards exhaustivity" )
1662
+ . element ( Level :: NOTE . message ( "the matched value is of type `NonEmptyEnum5`" ) )
1663
+ . element ( Level :: NOTE . message ( "match arms with guards don't count towards exhaustivity" )
1664
1664
) ,
1665
1665
Group :: with_title (
1666
1666
Level :: HELP
@@ -1749,7 +1749,7 @@ fn main() {
1749
1749
. primary ( true )
1750
1750
)
1751
1751
. element ( Padding )
1752
- . element ( Level :: NOTE . title ( "...because it uses `Self` as a type parameter" ) )
1752
+ . element ( Level :: NOTE . message ( "...because it uses `Self` as a type parameter" ) )
1753
1753
. element (
1754
1754
Snippet :: source ( source)
1755
1755
. line_start ( 1 )
@@ -2795,9 +2795,9 @@ fn main() {
2795
2795
. path ( "lint_example.rs" )
2796
2796
. annotation ( AnnotationKind :: Primary . span ( 40 ..49 ) ) ,
2797
2797
)
2798
- . element ( Level :: WARNING . title ( "this changes meaning in Rust 2021" ) )
2799
- . element ( Level :: NOTE . title ( long_title2) )
2800
- . element ( Level :: NOTE . title ( "`#[warn(array_into_iter)]` on by default" ) ) ,
2798
+ . element ( Level :: WARNING . message ( "this changes meaning in Rust 2021" ) )
2799
+ . element ( Level :: NOTE . message ( long_title2) )
2800
+ . element ( Level :: NOTE . message ( "`#[warn(array_into_iter)]` on by default" ) ) ,
2801
2801
Group :: with_title (
2802
2802
Level :: HELP . title ( "use `.iter()` instead of `.into_iter()` to avoid ambiguity" ) ,
2803
2803
)
You can’t perform that action at this time.
0 commit comments