Skip to content

Conversation

@Bryntet
Copy link
Contributor

@Bryntet Bryntet commented Dec 20, 2025

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

@rustbot
Copy link
Collaborator

rustbot commented Dec 20, 2025

Some changes occurred in compiler/rustc_hir/src/attrs

cc @jdonszelmann

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann

Some changes occurred in tests/ui/sanitizer

cc @rcvalle

Some changes occurred in compiler/rustc_sanitizers

cc @rcvalle

Some changes occurred in compiler/rustc_passes/src/check_attr.rs

cc @jdonszelmann

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 20, 2025
@rust-log-analyzer

This comment has been minimized.

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)]);
Copy link
Contributor

@JonathanBrouwer JonathanBrouwer Dec 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated to be Struct, ForeignTy, Enum and Union

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 20, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 20, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

Signed-off-by: Edvin Bryntesson <epost@edvinbryntesson.se>
@rustbot
Copy link
Collaborator

rustbot commented Dec 21, 2025

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.

@JonathanBrouwer
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Dec 21, 2025

📌 Commit d719a49 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 21, 2025
bors added a commit that referenced this pull request Dec 22, 2025
…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
@bors bors merged commit d31a2be into rust-lang:main Dec 22, 2025
11 checks passed
@rustbot rustbot added this to the 1.94.0 milestone Dec 22, 2025
rust-timer added a commit that referenced this pull request Dec 22, 2025
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`
@JonathanBrouwer
Copy link
Contributor

Minor perf regression in #150240 (comment)
No action needed, but maybe we can look into it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants