@@ -21,8 +21,9 @@ fn main() {
21
21
. input ( "main.rs" )
22
22
. run ( ) ;
23
23
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( )
26
27
) ;
27
28
28
29
// It should not be used when we explictly opt-out of lld.
@@ -33,8 +34,9 @@ fn main() {
33
34
. input ( "main.rs" )
34
35
. run ( ) ;
35
36
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( )
38
40
) ;
39
41
40
42
// While we're here, also check that the last linker feature flag "wins" when passed multiple
@@ -50,12 +52,13 @@ fn main() {
50
52
. input ( "main.rs" )
51
53
. run ( ) ;
52
54
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( )
55
58
) ;
56
59
}
57
60
58
- fn find_lld_version_in_logs ( output : Output ) -> bool {
61
+ fn find_lld_version_in_logs ( output : & Output ) -> bool {
59
62
let lld_version_re = Regex :: new ( r"^LLD [0-9]+\.[0-9]+\.[0-9]+" ) . unwrap ( ) ;
60
63
let stderr = std:: str:: from_utf8 ( & output. stderr ) . unwrap ( ) ;
61
64
stderr. lines ( ) . any ( |line| lld_version_re. is_match ( line) )
0 commit comments