Use delay_span_bug() over debug!()
This commit is contained in:
parent
142134d54f
commit
42410a96c4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user