Will the error go away if you add some real test (without removing current code)? It's possible that this "unexpected quit" is simply due to the fact that Cargo didn't find any tests to run at all.
Adding a regular test with #[test] does work. It finds only one test.
Why cant it run with just #[my_test]?
Or rather what do I need to tell #[my_test] to mimic a #[test]?
So, I think I know why the IDE is producing such a confusing error message when you don't emit #[test]:
The IDE is assuming that it_works is a #[test] function, maybe because it has an attribute that contains the test pattern?
First bug (IDE should expand macros at some point to make sure the function was #[test]-annotated).
I guess you then click on that gutter ▶ button which will cause your IDE to try and run that test by doing something like cargo test -- --exact tests::it_works, probably with an added --format=json flag (guessed from this PR).
The IDE then looks for something like { "type": "test", "name": "tests::it_works", "event": "<ok|failed>" … } among the emitted json events, which of course is missing because tests::it_works is not a test.
Confused, the IDE interprets that lack of json entry as a Test … quit unexpectedly
Second bug (it should look into that json output to see which tests actually started, so as to emit a message related to there not being a { "type": "test", "event": "started", "name": "tests::it_works" } event and thus reporting a failure to start that test).