-
Notifications
You must be signed in to change notification settings - Fork 13.4k
add (back) unsupported_calling_conventions lint to reject more invalid calling conventions #141435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
add (back) unsupported_calling_conventions lint to reject more invalid calling conventions #141435
Conversation
…d calling conventions
These commits modify compiler targets. |
3251270
to
f4146aa
Compare
also unify error messages that do not seem to have a good reason to be different
f4146aa
to
b8f4367
Compare
@rust-lang/lang following positive vibes expressed here, I'd like to land this PR as a first step to implement the plan from that issue. Can we get this FCPd? :) The one potential open question here is whether this should be a regular FCW first or whether it can immediately become an FCW that shows up in dependencies. I assume stdcall and fastcall are sufficiently rare that we can go for report-in-deps immediately (since they already get rejected on non-x86-32 non-Windows targets). "cdecl" might be more widely used though so it may be worth ramping up the lint more slowly. |
Searching across GitHub, there are 506 Rust file hits on Regarding whether to fire the FCW in deps immediately, I lean toward it probably being OK. Given that this may show up in |
Oh that's the syntax for doing such a search... I tried and failed to get a similar result out of github search.^^ |
This adds back the
unsupported_calling_conventions
lint that was removed in #129935, in order to start the process of dealing with #137018. Specifically, we are going for the plan laid out here:The difference to the status quo is that:
Vectorcall is an unstable ABI so we can just make this a hard error immediately. The others are stable, so we emit the
unsupported_calling_conventions
forward-compat lint. I set up the lint to show up in dependencies via cargo's future-compat report immediately, but we could also make it show up just for the local crate first if that is preferred.