Commit b24f68f 1 parent 9ce37dc commit b24f68f Copy full SHA for b24f68f
File tree 3 files changed +19
-10
lines changed
src/tools/run-make-support/src
3 files changed +19
-10
lines changed Original file line number Diff line number Diff line change 1
1
use std:: env;
2
+ use std:: ffi:: OsStr ;
2
3
use std:: path:: { Path , PathBuf } ;
3
4
use std:: process:: { Command , Output } ;
4
-
5
5
pub use wasmparser;
6
6
7
7
pub fn out_dir ( ) -> PathBuf {
@@ -43,7 +43,7 @@ impl RustcInvocationBuilder {
43
43
Self { cmd }
44
44
}
45
45
46
- pub fn arg ( & mut self , arg : & str ) -> & mut RustcInvocationBuilder {
46
+ pub fn arg < S : AsRef < OsStr > > ( & mut self , arg : S ) -> & mut RustcInvocationBuilder {
47
47
self . cmd . arg ( arg) ;
48
48
self
49
49
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ extern crate run_make_support;
2
+
3
+ use run_make_support:: { out_dir, rustc} ;
4
+
5
+ // Test that hir-tree output doesn't crash and includes
6
+ // the string constant we would expect to see.
7
+
8
+ fn main ( ) {
9
+ rustc ( )
10
+ . arg ( "-o" )
11
+ . arg ( & out_dir ( ) . join ( "input.hir" ) )
12
+ . arg ( "-Zunpretty=hir-tree" )
13
+ . arg ( "input.rs" )
14
+ . run ( ) ;
15
+ let file = std:: fs:: read_to_string ( & out_dir ( ) . join ( "input.hir" ) ) . unwrap ( ) ;
16
+ assert ! ( file. contains( r#""Hello, Rustaceans!\n""# ) ) ;
17
+ }
You can’t perform that action at this time.
0 commit comments