@@ -32,6 +32,7 @@ extern crate arena;
32
32
#[ no_link]
33
33
extern crate rustc_bitflags;
34
34
extern crate rustc_front;
35
+ #[ macro_use]
35
36
extern crate rustc;
36
37
37
38
use self :: PatternBindingMode :: * ;
@@ -2375,11 +2376,11 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
2375
2376
// The below shouldn't happen because all
2376
2377
// qualified paths should be in PatKind::QPath.
2377
2378
TypecheckRequired =>
2378
- self . session . span_bug ( path. span ,
2379
- "resolve_possibly_assoc_item claimed that a path \
2380
- in PatKind::Path or PatKind::TupleStruct \
2381
- requires typecheck to resolve, but qualified \
2382
- paths should be PatKind::QPath") ,
2379
+ span_bug ! ( path. span,
2380
+ "resolve_possibly_assoc_item claimed that a path \
2381
+ in PatKind::Path or PatKind::TupleStruct \
2382
+ requires typecheck to resolve, but qualified \
2383
+ paths should be PatKind::QPath") ,
2383
2384
ResolveAttempt ( resolution) => resolution,
2384
2385
} ;
2385
2386
if let Some ( path_res) = resolution {
@@ -2668,7 +2669,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
2668
2669
let mut def = local_def. def ;
2669
2670
match def {
2670
2671
Def :: Upvar ( ..) => {
2671
- self . session . span_bug ( span, & format ! ( "unexpected {:?} in bindings" , def) )
2672
+ span_bug ! ( span, "unexpected {:?} in bindings" , def)
2672
2673
}
2673
2674
Def :: Local ( _, node_id) => {
2674
2675
for rib in ribs {
@@ -3189,7 +3190,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
3189
3190
} )
3190
3191
}
3191
3192
Some ( _) => {
3192
- self . session . span_bug ( expr. span , "label wasn't mapped to a label def!" )
3193
+ span_bug ! ( expr. span, "label wasn't mapped to a label def!" )
3193
3194
}
3194
3195
}
3195
3196
}
@@ -3346,7 +3347,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
3346
3347
paths. push ( segm) ;
3347
3348
paths
3348
3349
}
3349
- _ => unreachable ! ( ) ,
3350
+ _ => bug ! ( ) ,
3350
3351
} ;
3351
3352
3352
3353
if !in_module_is_extern || name_binding. is_public ( ) {
@@ -3368,10 +3369,10 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
3368
3369
debug ! ( "(recording def) recording {:?} for {}" , resolution, node_id) ;
3369
3370
if let Some ( prev_res) = self . def_map . borrow_mut ( ) . insert ( node_id, resolution) {
3370
3371
let span = self . ast_map . opt_span ( node_id) . unwrap_or ( codemap:: DUMMY_SP ) ;
3371
- self . session . span_bug ( span,
3372
- & format ! ( "path resolved multiple times ({:?} before, {:?} now)" ,
3373
- prev_res,
3374
- resolution) ) ;
3372
+ span_bug ! ( span,
3373
+ "path resolved multiple times ({:?} before, {:?} now)" ,
3374
+ prev_res,
3375
+ resolution) ;
3375
3376
}
3376
3377
}
3377
3378
0 commit comments