From 5c5d10340573bbddd6447322eacd18f2e3d49207 Mon Sep 17 00:00:00 2001 From: llogiq Date: Tue, 15 Sep 2015 09:12:58 +0200 Subject: [PATCH] added fp test against negative .step_by(_) --- tests/compile-fail/for_loop.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/compile-fail/for_loop.rs b/tests/compile-fail/for_loop.rs index 882373e02167..a43ed7faa23b 100755 --- a/tests/compile-fail/for_loop.rs +++ b/tests/compile-fail/for_loop.rs @@ -1,4 +1,4 @@ -#![feature(plugin)] +#![feature(plugin, step_by)] #![plugin(clippy)] use std::collections::*; @@ -71,6 +71,10 @@ fn main() { println!("{}", i); } + for i in (10..8).step_by(-1) { + println!("{}", i); + } + let x = 42; for i in x..10 { // no error, not constant-foldable println!("{}", i);