@@ -143,8 +143,8 @@ Available lint options:
143143 for & ( _, name) in lint_dict. iter ( ) {
144144 max_key = cmp:: max ( name. len ( ) , max_key) ;
145145 }
146- fn padded ( max : uint , s : & str ) -> ~ str {
147- " " . repeat ( max - s. len ( ) ) + s
146+ fn padded ( max : uint , s : & str ) -> StrBuf {
147+ format ! ( "{}{}" , " " . repeat( max - s. len( ) ) , s )
148148 }
149149 println ! ( "\n Available lint checks:\n " ) ;
150150 println ! ( " {} {:7.7s} {}" ,
@@ -154,7 +154,7 @@ Available lint options:
154154 for ( spec, name) in lint_dict. move_iter ( ) {
155155 let name = name. replace ( "_" , "-" ) ;
156156 println ! ( " {} {:7.7s} {}" ,
157- padded( max_key, name) ,
157+ padded( max_key, name. as_slice ( ) ) ,
158158 lint:: level_to_str( spec. default ) ,
159159 spec. desc) ;
160160 }
@@ -400,11 +400,12 @@ fn monitor(f: proc():Send) {
400400
401401 let xs = [
402402 "the compiler hit an unexpected failure path. this is a bug." . to_owned ( ) ,
403- "we would appreciate a bug report: " + BUG_REPORT_URL ,
403+ format ! ( "we would appreciate a bug report: {}" ,
404+ BUG_REPORT_URL ) ,
404405 "run with `RUST_BACKTRACE=1` for a backtrace" . to_owned ( ) ,
405406 ] ;
406407 for note in xs. iter ( ) {
407- emitter. emit ( None , * note, diagnostic:: Note )
408+ emitter. emit ( None , note. as_slice ( ) , diagnostic:: Note )
408409 }
409410
410411 match r. read_to_str ( ) {
0 commit comments