Files
rust/tests/ui/test-attrs/test-function-elided-no-main.rs

9 lines
326 B
Rust
Raw Normal View History

2025-06-09 00:49:05 +05:00
//! Test that #[test] functions are elided when not running tests, causing missing main error
#[test]
fn main() {
// This function would normally serve as main, but since it's marked with #[test],
// it gets elided when not running tests
}
//~^ ERROR `main` function not found in crate `test_function_elided_no_main`