rustup to 1.5.0-nightly (7bf4c885f 2015-09-26)

fixes #348
This commit is contained in:
Manish Goregaokar
2015-09-28 10:34:06 +05:30
parent b749d832cc
commit 15e3774cb4
7 changed files with 24 additions and 22 deletions

View File

@@ -22,7 +22,7 @@ impl LateLintPass for StepByZero {
if let ExprMethodCall(Spanned { node: ref name, .. }, _,
ref args) = expr.node {
// Only warn on literal ranges.
if name == &"step_by" && args.len() == 2 &&
if name.as_str() == "step_by" && args.len() == 2 &&
is_range(cx, &args[0]) && is_integer_literal(&args[1], 0) {
cx.span_lint(RANGE_STEP_BY_ZERO, expr.span,
"Range::step_by(0) produces an infinite iterator. \