1 // run-rustfix
2 #![warn(clippy::repeat_once)]
3 #[allow(unused, clippy::redundant_clone)]
main()4 fn main() {
5     const N: usize = 1;
6     let s = "str";
7     let string = "String".to_string();
8     let slice = [1; 5];
9 
10     let a = [1; 5].repeat(1);
11     let b = slice.repeat(1);
12     let c = "hello".repeat(N);
13     let d = "hi".repeat(1);
14     let e = s.repeat(1);
15     let f = string.repeat(1);
16 }
17