diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2020-03-21 02:38:48 +0100 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2020-03-21 22:18:57 +0100 |
| commit | e0403bcde362ec85cbc2ca2a7bbf2ef6fecefcfa (patch) | |
| tree | 94b2d7775c93c896968eae35112d484faefc4f92 /src/librustc_ast_lowering/path.rs | |
| parent | 0f68ab03c3dd1df24063dcf8fc84cf56fa83a27b (diff) | |
| download | rust-e0403bcde362ec85cbc2ca2a7bbf2ef6fecefcfa.tar.gz rust-e0403bcde362ec85cbc2ca2a7bbf2ef6fecefcfa.zip | |
lowering: bug! -> panic!
Diffstat (limited to 'src/librustc_ast_lowering/path.rs')
| -rw-r--r-- | src/librustc_ast_lowering/path.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/librustc_ast_lowering/path.rs b/src/librustc_ast_lowering/path.rs index b5b0a3089ce..44bde42ba11 100644 --- a/src/librustc_ast_lowering/path.rs +++ b/src/librustc_ast_lowering/path.rs @@ -1,7 +1,6 @@ use super::{AnonymousLifetimeMode, ImplTraitContext, LoweringContext, ParamMode}; use super::{GenericArgsCtor, ParenthesizedGenericArgs}; -use rustc::span_bug; use rustc_ast::ast::{self, *}; use rustc_errors::{struct_span_err, Applicability}; use rustc_hir as hir; @@ -163,12 +162,15 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { } // We should've returned in the for loop above. - span_bug!( + + self.sess.diagnostic().span_bug( p.span, - "lower_qpath: no final extension segment in {}..{}", - proj_start, - p.segments.len() - ) + &format!( + "lower_qpath: no final extension segment in {}..{}", + proj_start, + p.segments.len() + ), + ); } crate fn lower_path_extra( |
