Reject no_mangle on EII implementations#159173
Conversation
|
Some changes occurred in compiler/rustc_passes/src/check_attr.rs |
23be887 to
9c36383
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
| } | ||
|
|
||
| if let Some(no_mangle_span) = | ||
| find_attr!(attrs, NoMangle(no_mangle_span) => *no_mangle_span) |
There was a problem hiding this comment.
This should also reject #[export_name] and probably #[link_section].
9c36383 to
81a1b49
Compare
|
Some changes occurred in compiler/rustc_attr_parsing cc @jdonszelmann, @JonathanBrouwer Some changes occurred in compiler/rustc_hir/src/attrs |
81a1b49 to
c7cb405
Compare
This comment has been minimized.
This comment has been minimized.
|
Maybe we ought to have an allowlist of attributes rather than error on these particular attributes? I'm also a bit worried about someone later down the line adding some new (possibly link related) attribute and not including it in this check. |
c7cb405 to
8e3fe6d
Compare
maybe allowlist contains |
Fixes #159015
r? @bjorn3