Closed
Description
On stable, it gives the expected error:
#[test] #[main] fn main() {}
error: declaration of a nonstandard #[main] function may change over time, for now a top-level `fn main()` is required (see issue #29634)
But on nightly it just says:
error: main function not found
This is because since #32846, complete feature-gate-checking is done after #[test]
items are stripped. It sounds to me easy to fix, but I'm wondering if feature-gate-checking is really the right place to catch this error. After all, we do not check #[test]
items for correctness, so we shouldn't feature-gate-check them either, just like #[cfg()]
-guarded items. Maybe the new message is fine after all.
cc @jseyfried