Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use delay_span_bug() over debug!()
  • Loading branch information
topecongiro committed Jan 12, 2018
1 parent 142134d commit 42410a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/librustc_const_eval/pattern.rs
Expand Up @@ -280,7 +280,8 @@ impl<'a, 'tcx> Pattern<'tcx> {
let mut pcx = PatternContext::new(tcx, param_env_and_substs, tables);
let result = pcx.lower_pattern(pat);
if !pcx.errors.is_empty() {
debug!("encountered errors lowering pattern: {:?}", pcx.errors)
let msg = format!("encountered errors lowering pattern: {:?}", pcx.errors);
tcx.sess.delay_span_bug(pat.span, &msg);
}
debug!("Pattern::from_hir({:?}) = {:?}", pat, result);
result
Expand Down

0 comments on commit 42410a9

Please sign in to comment.