// option. This file may not be copied, modified, or distributed
// except according to those terms.
-
-#![feature(tool_lints)]
-
#![feature(plugin)]
#![warn(clippy::indexing_slicing)]
#![warn(clippy::out_of_bounds_indexing)]
x[M]; // Ok, should not produce stderr.
v[N];
v[M];
+
+ // issue 3102
+ let num = 1;
+ &x[num..10]; // should trigger out of bounds error
+ &x[10..num]; // should trigger out of bounds error
}