Upgrade Rust to rustc 1.5.0-nightly (b2f379cdc 2015-09-23)
Ident was removed in many HIR structures in favor of Name.
This commit is contained in:
parent
4838e8a3b4
commit
b2c66d1a0e
9 changed files with 32 additions and 32 deletions
|
|
@ -19,10 +19,10 @@ impl LintPass for StepByZero {
|
|||
|
||||
impl LateLintPass for StepByZero {
|
||||
fn check_expr(&mut self, cx: &LateContext, expr: &Expr) {
|
||||
if let ExprMethodCall(Spanned { node: ref ident, .. }, _,
|
||||
if let ExprMethodCall(Spanned { node: ref name, .. }, _,
|
||||
ref args) = expr.node {
|
||||
// Only warn on literal ranges.
|
||||
if ident.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. \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue