mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-18 00:53:31 +00:00
added fp test against negative .step_by(_)
This commit is contained in:
parent
29904b9810
commit
5c5d103405
1 changed files with 5 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
#![feature(plugin)]
|
#![feature(plugin, step_by)]
|
||||||
#![plugin(clippy)]
|
#![plugin(clippy)]
|
||||||
|
|
||||||
use std::collections::*;
|
use std::collections::*;
|
||||||
|
@ -71,6 +71,10 @@ fn main() {
|
||||||
println!("{}", i);
|
println!("{}", i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for i in (10..8).step_by(-1) {
|
||||||
|
println!("{}", i);
|
||||||
|
}
|
||||||
|
|
||||||
let x = 42;
|
let x = 42;
|
||||||
for i in x..10 { // no error, not constant-foldable
|
for i in x..10 { // no error, not constant-foldable
|
||||||
println!("{}", i);
|
println!("{}", i);
|
||||||
|
|
Loading…
Reference in a new issue