Skip to content

Commit bdd6962

Browse files
committed
---
yaml --- r: 4372 b: refs/heads/master c: 97a8784 h: refs/heads/master v: v3
1 parent 94ef644 commit bdd6962

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 0b7a94a94c15546016a2c85329bfa16f5a39628a
2+
refs/heads/master: 97a8784c984bd19bf0a369ad5c3f8472ebc646eb

trunk/src/comp/driver/rustc.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,11 @@ fn parse_input(sess: session::session, cfg: &ast::crate_cfg, input: str) ->
9999

100100
fn parse_input_src(sess: session::session, cfg: &ast::crate_cfg,
101101
infile: str) -> {crate: @ast::crate, src: str} {
102-
let srcbytes = ioivec::stdin().read_whole_stream();
102+
let srcbytes = if infile != "-" {
103+
ioivec::file_reader(infile)
104+
} else {
105+
ioivec::stdin()
106+
}.read_whole_stream();
103107
let src = str::unsafe_from_bytes_ivec(srcbytes);
104108
let crate = parser::parse_crate_from_source_str(infile, src, cfg,
105109
sess.get_codemap());

0 commit comments

Comments
 (0)