-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Small adjustments to check_attribute_safety
to make the logic more obvious
#140619
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
Conversation
8d0848d
to
86c8cce
Compare
☔ The latest upstream changes (presumably #140633) made this pull request unmergeable. Please resolve the merge conflicts. |
86c8cce
to
e81c82d
Compare
@rustbot author |
Reminder, once the PR becomes ready for a review, use |
e81c82d
to
eb3a8e5
Compare
Switched to |
Some(AttributeSafety::Unsafe { .. } | AttributeSafety::Normal) | None, | ||
Safety::Safe(..), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remark: the ast::Safety
type is kinda weird, because it's dual-used by places where there can be {Safe, Unsafe, Default}
(within extern {}
blocks), and also other places where the Safety::Safe
variant must be impossible (unsafe vs normal attributes).
@bors r+ rollup |
Rollup of 6 pull requests Successful merges: - rust-lang#137280 (stabilize ptr::swap_nonoverlapping in const) - rust-lang#140457 (Use target-cpu=z13 on s390x codegen const vector test) - rust-lang#140619 (Small adjustments to `check_attribute_safety` to make the logic more obvious) - rust-lang#140625 (Suggest `retain_mut` over `retain` as `Vec::extract_if` alternative) - rust-lang#140627 (Allow linking rustc and rustdoc against the same single tracing crate) - rust-lang#140630 (Async drop source info fix for proxy-drop-coroutine) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#140619 - jieyouxu:validate_attr_cleanups, r=Urgau Small adjustments to `check_attribute_safety` to make the logic more obvious Follow-up to rust-lang#140617.
Follow-up to #140617.