1 // Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution.
4 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
5 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
7 // option. This file may not be copied, modified, or distributed
8 // except according to those terms.
10 #![warn(clippy::redundant_field_names)]
11 #![allow(unused_variables)]
12 #![feature(inclusive_range, inclusive_range_fields, inclusive_range_methods)]
15 extern crate derive_new;
17 use std::ops::{Range, RangeFrom, RangeInclusive, RangeTo, RangeToInclusive};
20 pub const BAR: u8 = 0;
47 buzz: fizz, //should be ok
48 foo: foo::BAR, //should be ok
52 let (start, end) = (0, 0);
62 let _: Vec<_> = (start..end).collect();
64 // hand-written Range family structs are linted
65 let _ = RangeFrom { start: start };
66 let _ = RangeTo { end: end };
67 let _ = Range { start: start, end: end };
68 let _ = RangeInclusive::new(start, end);
69 let _ = RangeToInclusive { end: end };