Skip to content
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

Emit an error for invalid use of the #[no_sanitize] attribute #128552

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

s7tya
Copy link
Contributor

@s7tya s7tya commented Aug 2, 2024

fixes #128487.

Currently, the use of the #[no_sanitize] attribute for Mod, Impl,... is incorrectly permitted. This PR will correct this issue by generating errors, and I've also added some UI test cases for it.

Referenced #128458. As far as I know, the #[no_sanitize] attribute can only be used with functions, so I changed that part to Fn and Method using check_applied_to_fn_or_method. However, I couldn't find explicit documentation on this, so I could be mistaken...

@rustbot
Copy link
Collaborator

rustbot commented Aug 2, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @BoxyUwU (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added 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 Aug 2, 2024
@bors
Copy link
Contributor

bors commented Aug 5, 2024

☔ The latest upstream changes (presumably #128672) made this pull request unmergeable. Please resolve the merge conflicts.

@s7tya s7tya force-pushed the check-no-sanitize-attribute-pos branch from d8b2b20 to d38b788 Compare August 5, 2024 09:55
@rust-log-analyzer

This comment has been minimized.

@s7tya s7tya force-pushed the check-no-sanitize-attribute-pos branch from d38b788 to 61ea488 Compare August 5, 2024 10:19
@BoxyUwU
Copy link
Member

BoxyUwU commented Aug 8, 2024

@bors r+ rollup

Thanks :3

@bors
Copy link
Contributor

bors commented Aug 8, 2024

📌 Commit 61ea488 has been approved by BoxyUwU

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-review Status: Awaiting review from the assignee but also interested parties. labels Aug 8, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 8, 2024
Rollup of 7 pull requests

Successful merges:

 - rust-lang#128520 (Skip over args when determining if async-closure's inner coroutine consumes its upvars)
 - rust-lang#128552 (Emit an error for invalid use of the `#[no_sanitize]` attribute)
 - rust-lang#128691 (Update `compiler-builtins` to 0.1.117)
 - rust-lang#128702 (Add -Zmetrics-dir=PATH to save diagnostic metadata to disk)
 - rust-lang#128797 (Fuchsia Test Runner: enable ffx repository server)
 - rust-lang#128798 (refactor(rustc_expand::mbe): Don't require full ExtCtxt when not necessary)
 - rust-lang#128800 (Add tracking issue to core-pattern-type)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6c2e067 into rust-lang:master Aug 8, 2024
6 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 8, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Aug 8, 2024
Rollup merge of rust-lang#128552 - s7tya:check-no-sanitize-attribute-pos, r=BoxyUwU

Emit an error for invalid use of the `#[no_sanitize]` attribute

fixes rust-lang#128487.

Currently, the use of the `#[no_sanitize]` attribute for Mod, Impl,... is incorrectly permitted. This PR will correct this issue by generating errors, and I've also added some UI test cases for it.

Referenced rust-lang#128458. As far as I know, the `#[no_sanitize]` attribute can only be used with functions, so I changed that part to `Fn` and `Method` using `check_applied_to_fn_or_method`. However, I couldn't find explicit documentation on this, so I could be mistaken...
@s7tya s7tya deleted the check-no-sanitize-attribute-pos branch August 8, 2024 07:11
tgross35 added a commit to tgross35/rust that referenced this pull request Aug 17, 2024
… r=petrochenkov

Emit an error for invalid use of the linkage attribute

fixes rust-lang#128486

Currently, the use of the linkage attribute for Mod, Impl,... is incorrectly permitted. This PR will correct this issue by generating errors, and I've also added some UI test cases for it.

Related: rust-lang#128552.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 17, 2024
… r=petrochenkov

Emit an error for invalid use of the linkage attribute

fixes rust-lang#128486

Currently, the use of the linkage attribute for Mod, Impl,... is incorrectly permitted. This PR will correct this issue by generating errors, and I've also added some UI test cases for it.

Related: rust-lang#128552.
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Aug 17, 2024
Rollup merge of rust-lang#128989 - s7tya:check-linkage-attribute-pos, r=petrochenkov

Emit an error for invalid use of the linkage attribute

fixes rust-lang#128486

Currently, the use of the linkage attribute for Mod, Impl,... is incorrectly permitted. This PR will correct this issue by generating errors, and I've also added some UI test cases for it.

Related: rust-lang#128552.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

no_sanitize attribute can be applied to any item with arbitrary arguments
5 participants