Skip to content

Commit c699a51

Browse files
committed
---
yaml --- r: 273842 b: refs/heads/beta c: cc8159b h: refs/heads/master
1 parent 08d1b76 commit c699a51

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
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: 065dcd0702769de9bd95d0e9887713c6778ed67f
26+
refs/heads/beta: cc8159b0ed63eb29254528fe9f078e3cec087b72
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_lint/bad_style.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub enum MethodLateContext {
3030
pub fn method_context(cx: &LateContext, id: ast::NodeId, span: Span) -> MethodLateContext {
3131
let def_id = cx.tcx.map.local_def_id(id);
3232
match cx.tcx.impl_or_trait_items.borrow().get(&def_id) {
33-
None => cx.sess().span_bug(span, "missing method descriptor?!"),
33+
None => span_bug!(span, "missing method descriptor?!"),
3434
Some(item) => match item.container() {
3535
ty::TraitContainer(..) => MethodLateContext::TraitDefaultImpl,
3636
ty::ImplContainer(cid) => {

branches/beta/src/librustc_lint/types.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ impl LateLintPass for TypeLimits {
181181
return;
182182
}
183183
}
184-
_ => panic!()
184+
_ => bug!()
185185
};
186186
},
187187
ty::TyUint(t) => {
@@ -195,7 +195,7 @@ impl LateLintPass for TypeLimits {
195195
// _v is u8, within range by definition
196196
ast::LitKind::Byte(_v) => return,
197197
ast::LitKind::Int(v, _) => v,
198-
_ => panic!()
198+
_ => bug!()
199199
};
200200
if lit_val < min || lit_val > max {
201201
cx.span_lint(OVERFLOWING_LITERALS, e.span,
@@ -212,7 +212,7 @@ impl LateLintPass for TypeLimits {
212212
Err(_) => return
213213
}
214214
}
215-
_ => panic!()
215+
_ => bug!()
216216
};
217217
if lit_val < min || lit_val > max {
218218
cx.span_lint(OVERFLOWING_LITERALS, e.span,
@@ -233,7 +233,7 @@ impl LateLintPass for TypeLimits {
233233
hir::BiGt => v >= min && v < max,
234234
hir::BiGe => v > min && v <= max,
235235
hir::BiEq | hir::BiNe => v >= min && v <= max,
236-
_ => panic!()
236+
_ => bug!()
237237
}
238238
}
239239

@@ -319,7 +319,7 @@ impl LateLintPass for TypeLimits {
319319
ast::LitKind::Int(v, ast::LitIntType::Unsuffixed) => v as i64,
320320
_ => return true
321321
},
322-
_ => panic!()
322+
_ => bug!()
323323
};
324324
is_valid(norm_binop, lit_val, min, max)
325325
}
@@ -330,7 +330,7 @@ impl LateLintPass for TypeLimits {
330330
ast::LitKind::Int(v, _) => v,
331331
_ => return true
332332
},
333-
_ => panic!()
333+
_ => bug!()
334334
};
335335
is_valid(norm_binop, lit_val, min, max)
336336
}
@@ -589,7 +589,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
589589
ty::TyParam(..) | ty::TyInfer(..) | ty::TyError |
590590
ty::TyClosure(..) | ty::TyProjection(..) |
591591
ty::TyFnDef(..) => {
592-
panic!("Unexpected type in foreign function")
592+
bug!("Unexpected type in foreign function")
593593
}
594594
}
595595
}

0 commit comments

Comments
 (0)