diff options
| author | Seiichi Uchida <seuchida@gmail.com> | 2018-01-13 00:54:56 +0900 |
|---|---|---|
| committer | Seiichi Uchida <seuchida@gmail.com> | 2018-01-13 00:54:56 +0900 |
| commit | 42410a96c40790fb050b528cb1a6277743f15d4f (patch) | |
| tree | 720659b650f734289ec179bf160624b610bda01d | |
| parent | 142134d54fb20b0669754f439cf0001869c406b5 (diff) | |
| download | rust-42410a96c40790fb050b528cb1a6277743f15d4f.tar.gz rust-42410a96c40790fb050b528cb1a6277743f15d4f.zip | |
Use delay_span_bug() over debug!()
| -rw-r--r-- | src/librustc_const_eval/pattern.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_const_eval/pattern.rs b/src/librustc_const_eval/pattern.rs index 0f8efa030ea..3cfa1d6797d 100644 --- a/src/librustc_const_eval/pattern.rs +++ b/src/librustc_const_eval/pattern.rs @@ -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 |
