Skip to content

Commit ebc2ee4

Browse files
committed
---
yaml --- r: 273847 b: refs/heads/beta c: d05f726 h: refs/heads/master i: 273845: a3e15df 273843: fa56095 273839: e7ec5a9
1 parent 4871ae2 commit ebc2ee4

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 487219ccb1c39cf9a2046cf4271d6cac7dbf8a27
26+
refs/heads/beta: d05f726eed5a977d546a92d64d2402cb049e505e
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/librustc_resolve/build_reduced_graph.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ impl<'b, 'tcx:'b> Resolver<'b, 'tcx> {
507507
Def::Label(..) |
508508
Def::SelfTy(..) |
509509
Def::Err => {
510-
panic!("didn't expect `{:?}`", def);
510+
bug!("didn't expect `{:?}`", def);
511511
}
512512
}
513513
}

branches/beta/src/librustc_resolve/lib.rs

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ extern crate arena;
3232
#[no_link]
3333
extern crate rustc_bitflags;
3434
extern crate rustc_front;
35+
#[macro_use]
3536
extern crate rustc;
3637

3738
use self::PatternBindingMode::*;
@@ -2375,11 +2376,11 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
23752376
// The below shouldn't happen because all
23762377
// qualified paths should be in PatKind::QPath.
23772378
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"),
23832384
ResolveAttempt(resolution) => resolution,
23842385
};
23852386
if let Some(path_res) = resolution {
@@ -2668,7 +2669,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
26682669
let mut def = local_def.def;
26692670
match def {
26702671
Def::Upvar(..) => {
2671-
self.session.span_bug(span, &format!("unexpected {:?} in bindings", def))
2672+
span_bug!(span, "unexpected {:?} in bindings", def)
26722673
}
26732674
Def::Local(_, node_id) => {
26742675
for rib in ribs {
@@ -3189,7 +3190,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
31893190
})
31903191
}
31913192
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!")
31933194
}
31943195
}
31953196
}
@@ -3346,7 +3347,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
33463347
paths.push(segm);
33473348
paths
33483349
}
3349-
_ => unreachable!(),
3350+
_ => bug!(),
33503351
};
33513352

33523353
if !in_module_is_extern || name_binding.is_public() {
@@ -3368,10 +3369,10 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
33683369
debug!("(recording def) recording {:?} for {}", resolution, node_id);
33693370
if let Some(prev_res) = self.def_map.borrow_mut().insert(node_id, resolution) {
33703371
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);
33753376
}
33763377
}
33773378

0 commit comments

Comments
 (0)