File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ pub static C: u32 = 0 - 1;
1717"# ;
1818 let message = & [ Group :: with_title (
1919 Level :: ERROR
20- . text ( Some ( "error: internal compiler error" ) )
20+ . with_name ( Some ( "error: internal compiler error" ) )
2121 . title ( "could not evaluate static initializer" )
2222 . id ( "E0080" ) ,
2323 )
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ fn main() {
5252 ) ,
5353 Group :: with_title (
5454 Level :: HELP
55- . text ( Some ( "suggestion" ) )
55+ . with_name ( Some ( "suggestion" ) )
5656 . title ( "use `break` on its own without a value inside this `while` loop" ) ,
5757 )
5858 . element (
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ impl<'a> Level<'a> {
5050 pub const NOTE : Level < ' a > = NOTE ;
5151 pub const HELP : Level < ' a > = HELP ;
5252
53- /// Replace the text describing this [`Level`]
53+ /// Replace the name describing this [`Level`]
5454 ///
5555 /// <div class="warning">
5656 ///
@@ -59,9 +59,9 @@ impl<'a> Level<'a> {
5959 /// not allowed to be passed to this function.
6060 ///
6161 /// </div>
62- pub fn text ( self , text : impl Into < OptionCow < ' a > > ) -> Level < ' a > {
62+ pub fn with_name ( self , name : impl Into < OptionCow < ' a > > ) -> Level < ' a > {
6363 Level {
64- name : Some ( text . into ( ) . 0 ) ,
64+ name : Some ( name . into ( ) . 0 ) ,
6565 level : self . level ,
6666 }
6767 }
Original file line number Diff line number Diff line change @@ -2397,7 +2397,7 @@ fn secondary_title_no_level_text() {
23972397 )
23982398 . element (
23992399 Level :: NOTE
2400- . text ( None :: < & str > )
2400+ . with_name ( None :: < & str > )
24012401 . title ( "expected reference `&str`\n found reference `&'static [u8; 0]`" ) ,
24022402 ) ,
24032403 ] ;
@@ -2442,7 +2442,7 @@ fn secondary_title_custom_level_text() {
24422442 )
24432443 . element (
24442444 Level :: NOTE
2445- . text ( Some ( "custom" ) )
2445+ . with_name ( Some ( "custom" ) )
24462446 . title ( "expected reference `&str`\n found reference `&'static [u8; 0]`" ) ,
24472447 ) ,
24482448 ] ;
@@ -2515,7 +2515,7 @@ fn main() {
25152515 ) ,
25162516 Group :: with_title (
25172517 Level :: HELP
2518- . text ( Some ( "suggestion" ) )
2518+ . with_name ( Some ( "suggestion" ) )
25192519 . title ( "use `break` on its own without a value inside this `while` loop" )
25202520 . id ( "S0123" ) ,
25212521 )
You can’t perform that action at this time.
0 commit comments