When #![no_main]
is set, #[start]
is silently ignored
#124581
Labels
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
P-low
Low priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
This came up in rust-lang/miri#3498: a user wrote code roughly like this
and then was surprised that the resulting program didn't have a start function.
The
start
attribute seems to be entirely ignored, because usually there would be an error that the signature is wrong.The combination of no_main and the
start
attribute should probably emit a suitable diagnostic, instead of silently ignoring the attribute.The text was updated successfully, but these errors were encountered: