Closed
Description
echo 'fn test(){} fn main() {}' | rustc - -Z treat-err-as-bug
<anon>:1:1: 1:12 warning: function is never used: `test`, #[warn(dead_code)] on by default
<anon>:1 fn test(){} fn main() {}
^~~~~~~~~~~
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
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'encountered error with `-Z treat_err_as_bug', ../src/librustc_errors/lib.rs:546