Rustup to 1.9.0-nightly (5ab11d72c 2016-04-02)
This commit is contained in:
@@ -149,14 +149,14 @@ impl<'a, 'b, 'tcx> Visitor<'a> for CCHelper<'b, 'tcx> {
|
||||
}
|
||||
|
||||
#[cfg(feature="debugging")]
|
||||
fn report_cc_bug(cx: &LateContext, cc: u64, narms: u64, div: u64, shorts: u64, span: Span) {
|
||||
cx.sess().span_bug(span,
|
||||
&format!("Clippy encountered a bug calculating cyclomatic complexity: cc = {}, arms = {}, \
|
||||
fn report_cc_bug(_: &LateContext, cc: u64, narms: u64, div: u64, shorts: u64, span: Span) {
|
||||
span_bug!(span,
|
||||
"Clippy encountered a bug calculating cyclomatic complexity: cc = {}, arms = {}, \
|
||||
div = {}, shorts = {}. Please file a bug report.",
|
||||
cc,
|
||||
narms,
|
||||
div,
|
||||
shorts));;
|
||||
shorts);
|
||||
}
|
||||
#[cfg(not(feature="debugging"))]
|
||||
fn report_cc_bug(cx: &LateContext, cc: u64, narms: u64, div: u64, shorts: u64, span: Span) {
|
||||
|
||||
@@ -144,7 +144,7 @@ impl<'a, 'tcx: 'a> Delegate<'tcx> for EscapeDelegate<'a, 'tcx> {
|
||||
self.set.remove(&lid); // Used without autodereffing (i.e. x.clone())
|
||||
}
|
||||
} else {
|
||||
self.cx.sess().span_bug(cmt.span, "Unknown adjusted AutoRef");
|
||||
span_bug!(cmt.span, "Unknown adjusted AutoRef");
|
||||
}
|
||||
} else if LoanCause::AddrOf == loan_cause {
|
||||
// &x
|
||||
|
||||
@@ -415,8 +415,8 @@ fn match_template(cx: &LateContext, span: Span, source: MatchSource, op: &str, e
|
||||
MatchSource::Normal => format!("match {}{} {{ .. }}", op, expr_snippet),
|
||||
MatchSource::IfLetDesugar { .. } => format!("if let .. = {}{} {{ .. }}", op, expr_snippet),
|
||||
MatchSource::WhileLetDesugar => format!("while let .. = {}{} {{ .. }}", op, expr_snippet),
|
||||
MatchSource::ForLoopDesugar => cx.sess().span_bug(span, "for loop desugared to match with &-patterns!"),
|
||||
MatchSource::TryDesugar => cx.sess().span_bug(span, "`?` operator desugared to match with &-patterns!")
|
||||
MatchSource::ForLoopDesugar => span_bug!(span, "for loop desugared to match with &-patterns!"),
|
||||
MatchSource::TryDesugar => span_bug!(span, "`?` operator desugared to match with &-patterns!")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user