Port #[cfi_encoding] to attribute parser#150204
Conversation
This comment has been minimized.
This comment has been minimized.
compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/encode.rs
Outdated
Show resolved
Hide resolved
| impl<S: Stage> SingleAttributeParser<S> for CfiEncodingParser { | ||
| const PATH: &[Symbol] = &[sym::cfi_encoding]; | ||
| const ALLOWED_TARGETS: AllowedTargets = | ||
| AllowedTargets::AllowListWarnRest(&[Allow(Target::Fn), Allow(Target::Struct)]); |
There was a problem hiding this comment.
I don't think it makes sense to apply this attribute to a function.
I think it does make sense on Struct,ExternTy, Enum and Union.
This is what I got from quickly trying to read https://rcvalle.com/docs/rust-cfi-design-doc.pdf
@rcvalle Could you verify the list of attribute targets that #[cfi_encoding] is sensible on?
There was a problem hiding this comment.
updated to be Struct, ForeignTy, Enum and Union
|
Reminder, once the PR becomes ready for a review, use |
57419ef to
c5db47b
Compare
Signed-off-by: Edvin Bryntesson <epost@edvinbryntesson.se>
c5db47b to
73dbdfb
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. |
73dbdfb to
d719a49
Compare
|
@bors r+ rollup |
…uwer Rollup of 4 pull requests Successful merges: - #149840 (Update comment for `STAGE0_MISSING_TARGETS`) - #150109 (crash test readme: point to rustc-dev-guide) - #150204 (Port `#[cfi_encoding]` to attribute parser) - #150237 (Skip tidy target-specific check for `run-make-cargo` too) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #150204 - Bryntet:parse_cfi_encoding, r=JonathanBrouwer Port `#[cfi_encoding]` to attribute parser The error message is kind of saying the same thing twice, would like input on which .expect function I should use instead to not have it be double, otherwise this passes all tests locally where this attribute is used r? `@JonathanBrouwer`
|
Minor perf regression in #150240 (comment) |
…uwer Rollup of 4 pull requests Successful merges: - rust-lang/rust#149840 (Update comment for `STAGE0_MISSING_TARGETS`) - rust-lang/rust#150109 (crash test readme: point to rustc-dev-guide) - rust-lang/rust#150204 (Port `#[cfi_encoding]` to attribute parser) - rust-lang/rust#150237 (Skip tidy target-specific check for `run-make-cargo` too) r? `@ghost` `@rustbot` modify labels: rollup
The error message is kind of saying the same thing twice, would like input on which .expect function I should use instead to not have it be double, otherwise this passes all tests locally where this attribute is used
r? @JonathanBrouwer