File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ pub static C: u32 = 0 - 1;
17
17
"# ;
18
18
let message = & [ Group :: with_title (
19
19
Level :: ERROR
20
- . text ( Some ( "error: internal compiler error" ) )
20
+ . with_name ( Some ( "error: internal compiler error" ) )
21
21
. title ( "could not evaluate static initializer" )
22
22
. id ( "E0080" ) ,
23
23
)
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ fn main() {
52
52
) ,
53
53
Group :: with_title (
54
54
Level :: HELP
55
- . text ( Some ( "suggestion" ) )
55
+ . with_name ( Some ( "suggestion" ) )
56
56
. title ( "use `break` on its own without a value inside this `while` loop" ) ,
57
57
)
58
58
. element (
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ impl<'a> Level<'a> {
50
50
pub const NOTE : Level < ' a > = NOTE ;
51
51
pub const HELP : Level < ' a > = HELP ;
52
52
53
- /// Replace the text describing this [`Level`]
53
+ /// Replace the name describing this [`Level`]
54
54
///
55
55
/// <div class="warning">
56
56
///
@@ -59,7 +59,7 @@ impl<'a> Level<'a> {
59
59
/// not allowed to be passed to this function.
60
60
///
61
61
/// </div>
62
- pub fn text ( self , text : impl Into < OptionCow < ' a > > ) -> Level < ' a > {
62
+ pub fn with_name ( self , text : impl Into < OptionCow < ' a > > ) -> Level < ' a > {
63
63
Level {
64
64
name : Some ( text. into ( ) . 0 ) ,
65
65
level : self . level ,
Original file line number Diff line number Diff line change @@ -2397,7 +2397,7 @@ fn secondary_title_no_level_text() {
2397
2397
)
2398
2398
. element (
2399
2399
Level :: NOTE
2400
- . text ( None :: < & str > )
2400
+ . with_name ( None :: < & str > )
2401
2401
. title ( "expected reference `&str`\n found reference `&'static [u8; 0]`" ) ,
2402
2402
) ,
2403
2403
] ;
@@ -2442,7 +2442,7 @@ fn secondary_title_custom_level_text() {
2442
2442
)
2443
2443
. element (
2444
2444
Level :: NOTE
2445
- . text ( Some ( "custom" ) )
2445
+ . with_name ( Some ( "custom" ) )
2446
2446
. title ( "expected reference `&str`\n found reference `&'static [u8; 0]`" ) ,
2447
2447
) ,
2448
2448
] ;
@@ -2515,7 +2515,7 @@ fn main() {
2515
2515
) ,
2516
2516
Group :: with_title (
2517
2517
Level :: HELP
2518
- . text ( Some ( "suggestion" ) )
2518
+ . with_name ( Some ( "suggestion" ) )
2519
2519
. title ( "use `break` on its own without a value inside this `while` loop" )
2520
2520
. id ( "S0123" ) ,
2521
2521
)
You can’t perform that action at this time.
0 commit comments