@@ -21,8 +21,9 @@ fn main() {
2121 . input ( "main.rs" )
2222 . run ( ) ;
2323 assert ! (
24- find_lld_version_in_logs( output) ,
25- "the LLD version string should be present in the output logs"
24+ find_lld_version_in_logs( & output) ,
25+ "the LLD version string should be present in the output logs:\n {}" ,
26+ std:: str :: from_utf8( & output. stderr) . unwrap( )
2627 ) ;
2728
2829 // It should not be used when we explictly opt-out of lld.
@@ -33,8 +34,9 @@ fn main() {
3334 . input ( "main.rs" )
3435 . run ( ) ;
3536 assert ! (
36- !find_lld_version_in_logs( output) ,
37- "the LLD version string should not be present in the output logs"
37+ !find_lld_version_in_logs( & output) ,
38+ "the LLD version string should not be present in the output logs:\n {}" ,
39+ std:: str :: from_utf8( & output. stderr) . unwrap( )
3840 ) ;
3941
4042 // While we're here, also check that the last linker feature flag "wins" when passed multiple
@@ -50,12 +52,13 @@ fn main() {
5052 . input ( "main.rs" )
5153 . run ( ) ;
5254 assert ! (
53- find_lld_version_in_logs( output) ,
54- "the LLD version string should be present in the output logs"
55+ find_lld_version_in_logs( & output) ,
56+ "the LLD version string should be present in the output logs:\n {}" ,
57+ std:: str :: from_utf8( & output. stderr) . unwrap( )
5558 ) ;
5659}
5760
58- fn find_lld_version_in_logs ( output : Output ) -> bool {
61+ fn find_lld_version_in_logs ( output : & Output ) -> bool {
5962 let lld_version_re = Regex :: new ( r"^LLD [0-9]+\.[0-9]+\.[0-9]+" ) . unwrap ( ) ;
6063 let stderr = std:: str:: from_utf8 ( & output. stderr ) . unwrap ( ) ;
6164 stderr. lines ( ) . any ( |line| lld_version_re. is_match ( line) )
0 commit comments