rust/tests/ui/crate_level_checks/std_main_recursion.rs

8 lines
172 B
Rust

#[warn(clippy::main_recursion)]
#[allow(unconditional_recursion)]
fn main() {
println!("Hello, World!");
main();
//~^ ERROR: recursing into entrypoint `main`
}