Skip to content

Commit

Permalink
always print backtrace when CTFE_BACKTRACE is set
Browse files Browse the repository at this point in the history
No point in making the user also enable RUST_LOG
  • Loading branch information
RalfJung committed Oct 28, 2018
1 parent aaa505a commit 5903fdb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustc/mir/interpret/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ pub struct EvalError<'tcx> {
impl<'tcx> EvalError<'tcx> {
pub fn print_backtrace(&mut self) {
if let Some(ref mut backtrace) = self.backtrace {
error!("{}", print_backtrace(&mut *backtrace));
eprintln!("{}", print_backtrace(&mut *backtrace));
}
}
}
Expand Down Expand Up @@ -206,7 +206,7 @@ impl<'tcx> From<EvalErrorKind<'tcx, u64>> for EvalError<'tcx> {

if val == "immediate" {
// Print it now
error!("{}", print_backtrace(&mut backtrace));
eprintln!("{}", print_backtrace(&mut backtrace));
None
} else {
Some(Box::new(backtrace))
Expand Down

0 comments on commit 5903fdb

Please sign in to comment.