File tree Expand file tree Collapse file tree 3 files changed +19
-10
lines changed
src/tools/run-make-support/src Expand file tree Collapse file tree 3 files changed +19
-10
lines changed Original file line number Diff line number Diff line change 11use std:: env;
2+ use std:: ffi:: OsStr ;
23use std:: path:: { Path , PathBuf } ;
34use std:: process:: { Command , Output } ;
4-
55pub use wasmparser;
66
77pub fn out_dir ( ) -> PathBuf {
@@ -43,7 +43,7 @@ impl RustcInvocationBuilder {
4343 Self { cmd }
4444 }
4545
46- pub fn arg ( & mut self , arg : & str ) -> & mut RustcInvocationBuilder {
46+ pub fn arg < S : AsRef < OsStr > > ( & mut self , arg : S ) -> & mut RustcInvocationBuilder {
4747 self . cmd . arg ( arg) ;
4848 self
4949 }
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