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

Add some more attribute validation #92701

Merged
merged 2 commits into from
Jan 18, 2022

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Jan 9, 2022

This adds some more validation for the position of attributes:

  • link is only valid on an extern block
  • windows_subsystem and no_builtins are only valid at the crate level

These attributes are only checked at the crate root, so they should
have a warning if they are used anywhere else.
@rust-highfive
Copy link
Collaborator

r? @matthewjasper

(rust-highfive has picked a reviewer for you, use r? to override)

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jan 9, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 9, 2022
@matthewjasper
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jan 16, 2022

📌 Commit b59e743 has been approved by matthewjasper

@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 Jan 16, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 18, 2022
…askrgr

Rollup of 14 pull requests

Successful merges:

 - rust-lang#92629 (Pick themes on settings page, not every page)
 - rust-lang#92640 (Fix ICEs related to `Deref<Target=[T; N]>` on newtypes)
 - rust-lang#92701 (Add some more attribute validation)
 - rust-lang#92803 (Hide mobile sidebar on some clicks)
 - rust-lang#92830 (Rustdoc style cleanups)
 - rust-lang#92866 ("Does exists" typos fix)
 - rust-lang#92870 (add `rustc_diagnostic_item` attribute to `AtomicBool` type)
 - rust-lang#92914 (htmldocck: Add support for `/text()` in ``@snapshot`)`
 - rust-lang#92923 (Abstract the pretty printer's ringbuffer to be infinitely sized)
 - rust-lang#92946 (Exclude llvm-libunwind from the self-contained set on s390x-musl targets)
 - rust-lang#92947 (rustdoc: Use `intersperse` in a `visit_path` function)
 - rust-lang#92997 (Add `~const` bound test for negative impls)
 - rust-lang#93004 (update codegen test for LLVM 14)
 - rust-lang#93016 (Stabilize vec_spare_capacity)

Failed merges:

 - rust-lang#92924 (Delete pretty printer tracing)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 804072f into rust-lang:master Jan 18, 2022
@rustbot rustbot added this to the 1.60.0 milestone Jan 18, 2022
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.

5 participants