2023-04-20 09:37:15 -05:00
|
|
|
//@run-rustfix
|
2020-07-04 08:50:03 -05:00
|
|
|
#![warn(clippy::repeat_once)]
|
2021-09-14 11:48:30 -05:00
|
|
|
#[allow(unused, clippy::redundant_clone)]
|
2020-07-04 08:50:03 -05:00
|
|
|
fn main() {
|
|
|
|
const N: usize = 1;
|
|
|
|
let s = "str";
|
|
|
|
let string = "String".to_string();
|
|
|
|
let slice = [1; 5];
|
|
|
|
|
|
|
|
let a = [1; 5].repeat(1);
|
|
|
|
let b = slice.repeat(1);
|
|
|
|
let c = "hello".repeat(N);
|
|
|
|
let d = "hi".repeat(1);
|
|
|
|
let e = s.repeat(1);
|
|
|
|
let f = string.repeat(1);
|
|
|
|
}
|