Skip to content

Commit ae5c5ae

Browse files
committed
moved renamed docs stderr formatted | elided-test.rs
1 parent c4ff80c commit ae5c5ae

File tree

4 files changed

+17
-14
lines changed

4 files changed

+17
-14
lines changed

tests/ui/elided-test.rs

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/ui/elided-test.stderr

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//! Test that #[test] functions are elided when not running tests, causing missing main error
2+
3+
#[test]
4+
fn main() {
5+
// This function would normally serve as main, but since it's marked with #[test],
6+
// it gets elided when not running tests
7+
}
8+
//~^ ERROR `main` function not found in crate `test_function_elided_no_main`
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error[E0601]: `main` function not found in crate `test_function_elided_no_main`
2+
--> $DIR/test-function-elided-no-main.rs:14:2
3+
|
4+
LL | }
5+
| ^ consider adding a `main` function to `$DIR/test-function-elided-no-main.rs`
6+
7+
error: aborting due to 1 previous error
8+
9+
For more information about this error, try `rustc --explain E0601`.

0 commit comments

Comments
 (0)