@@ -90,6 +90,7 @@ use rustc_codegen_utils::codegen_backend::CodegenBackend;
90
90
use serialize:: json:: ToJson ;
91
91
92
92
use std:: any:: Any ;
93
+ use std:: borrow:: Cow ;
93
94
use std:: cmp:: max;
94
95
use std:: default:: Default ;
95
96
use std:: env:: consts:: { DLL_PREFIX , DLL_SUFFIX } ;
@@ -1678,25 +1679,25 @@ pub fn monitor<F: FnOnce() + Send + 'static>(f: F) -> Result<(), CompilationFail
1678
1679
errors:: Level :: Bug ) ;
1679
1680
}
1680
1681
1681
- let mut xs = vec ! [
1682
- "the compiler unexpectedly panicked. this is a bug." . to_string ( ) ,
1683
- format!( "we would appreciate a bug report: {}" , BUG_REPORT_URL ) ,
1682
+ let mut xs: Vec < Cow < ' static , str > > = vec ! [
1683
+ "the compiler unexpectedly panicked. this is a bug." . into ( ) ,
1684
+ format!( "we would appreciate a bug report: {}" , BUG_REPORT_URL ) . into ( ) ,
1684
1685
format!( "rustc {} running on {}" ,
1685
1686
option_env!( "CFG_VERSION" ) . unwrap_or( "unknown_version" ) ,
1686
- config:: host_triple( ) ) ,
1687
+ config:: host_triple( ) ) . into ( ) ,
1687
1688
] ;
1688
1689
1689
1690
if let Some ( ( flags, excluded_cargo_defaults) ) = extra_compiler_flags ( ) {
1690
- xs. push ( format ! ( "compiler flags: {}" , flags. join( " " ) ) ) ;
1691
+ xs. push ( format ! ( "compiler flags: {}" , flags. join( " " ) ) . into ( ) ) ;
1691
1692
1692
1693
if excluded_cargo_defaults {
1693
- xs. push ( "some of the compiler flags provided by cargo are hidden" . to_string ( ) ) ;
1694
+ xs. push ( "some of the compiler flags provided by cargo are hidden" . into ( ) ) ;
1694
1695
}
1695
1696
}
1696
1697
1697
1698
for note in & xs {
1698
1699
handler. emit ( & MultiSpan :: new ( ) ,
1699
- & note,
1700
+ note,
1700
1701
errors:: Level :: Note ) ;
1701
1702
}
1702
1703
0 commit comments