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")]
|
#[cfg(feature="debugging")]
|
||||||
fn report_cc_bug(cx: &LateContext, cc: u64, narms: u64, div: u64, shorts: u64, span: Span) {
|
fn report_cc_bug(_: &LateContext, cc: u64, narms: u64, div: u64, shorts: u64, span: Span) {
|
||||||
cx.sess().span_bug(span,
|
span_bug!(span,
|
||||||
&format!("Clippy encountered a bug calculating cyclomatic complexity: cc = {}, arms = {}, \
|
"Clippy encountered a bug calculating cyclomatic complexity: cc = {}, arms = {}, \
|
||||||
div = {}, shorts = {}. Please file a bug report.",
|
div = {}, shorts = {}. Please file a bug report.",
|
||||||
cc,
|
cc,
|
||||||
narms,
|
narms,
|
||||||
div,
|
div,
|
||||||
shorts));;
|
shorts);
|
||||||
}
|
}
|
||||||
#[cfg(not(feature="debugging"))]
|
#[cfg(not(feature="debugging"))]
|
||||||
fn report_cc_bug(cx: &LateContext, cc: u64, narms: u64, div: u64, shorts: u64, span: Span) {
|
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())
|
self.set.remove(&lid); // Used without autodereffing (i.e. x.clone())
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
self.cx.sess().span_bug(cmt.span, "Unknown adjusted AutoRef");
|
span_bug!(cmt.span, "Unknown adjusted AutoRef");
|
||||||
}
|
}
|
||||||
} else if LoanCause::AddrOf == loan_cause {
|
} else if LoanCause::AddrOf == loan_cause {
|
||||||
// &x
|
// &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::Normal => format!("match {}{} {{ .. }}", op, expr_snippet),
|
||||||
MatchSource::IfLetDesugar { .. } => format!("if let .. = {}{} {{ .. }}", op, expr_snippet),
|
MatchSource::IfLetDesugar { .. } => format!("if let .. = {}{} {{ .. }}", op, expr_snippet),
|
||||||
MatchSource::WhileLetDesugar => format!("while 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::ForLoopDesugar => span_bug!(span, "for loop desugared to match with &-patterns!"),
|
||||||
MatchSource::TryDesugar => cx.sess().span_bug(span, "`?` operator desugared to match with &-patterns!")
|
MatchSource::TryDesugar => span_bug!(span, "`?` operator desugared to match with &-patterns!")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user