]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/single_element_loop.fixed
Rollup merge of #78502 - matthewjasper:chalkup, r=nikomatsakis
[rust.git] / src / tools / clippy / tests / ui / single_element_loop.fixed
1 // run-rustfix
2 // Tests from for_loop.rs that don't have suggestions
3
4 #[warn(clippy::single_element_loop)]
5 fn main() {
6     let item1 = 2;
7     {
8         let item = &item1;
9         println!("{}", item);
10     }
11 }