about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorMark Simulacrum <mark.simulacrum@gmail.com>2017-05-19 14:16:24 -0600
committerGitHub <noreply@github.com>2017-05-19 14:16:24 -0600
commitfd8ca3ea6d9dbd09336f882ec9a2952a752954b5 (patch)
tree378a1d370dedb584c0f657ad6bc218d9077c92f6 /src/rustllvm/RustWrapper.cpp
parent7812adf1ee3b410ca367958f0d7275992982b031 (diff)
parente86588e2286ac2c0fb4763bf2d8c3046d0abcc22 (diff)
downloadrust-fd8ca3ea6d9dbd09336f882ec9a2952a752954b5.tar.gz
rust-fd8ca3ea6d9dbd09336f882ec9a2952a752954b5.zip
Rollup merge of #42092 - cuviper:args_os, r=Mark-Simulacrum
Give a nicer error for non-Unicode arguments to rustc and rustdoc

Previously, any non-Unicode argument would panic rustc:

```
$ rustc $'foo\x80bar'
error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report:
https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value:
"foo�bar"', /checkout/src/libcore/result.rs:859 note: Run with
`RUST_BACKTRACE=1` for a backtrace.
```

Now it gives a clean error:

```
$ rustc $'foo\x80bar'
error: Argument 1 is not valid Unicode: "foo�bar"
```

Maybe fixes #15890, although we still can't *compile* arbitrary file names.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions