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 disclaimer on size assertion macro #115087

Merged
merged 2 commits into from
Aug 22, 2023
Merged

Conversation

Noratrieb
Copy link
Member

Sometimes people are inspired by rustc to add size assertions to their code and copy the macro. This is bad because it causes hard build errors. rustc happens to be special where it makes this okay.

For example, see #115028 (not sure whether they were directly inspired by this function), but I think I've also seen other cases.

Sometimes people are inspired by rustc to add size assertions to their
code and copy the macro. This is bad because it causes hard build
errors. rustc happens to be special where it makes this okay.
@rustbot
Copy link
Collaborator

rustbot commented Aug 22, 2023

r? @fee1-dead

(rustbot has picked a reviewer for you, use r? to override)

@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 22, 2023
@fee1-dead
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 22, 2023

📌 Commit 1b9159e has been approved by fee1-dead

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 22, 2023
@Noratrieb
Copy link
Member Author

@bors r- perfect

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 22, 2023
@Noratrieb Noratrieb added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 22, 2023
@fmease
Copy link
Member

fmease commented Aug 22, 2023

@Nilstrieb Ah, sorry needs one additional </p> before the </div> 😅

@rust-log-analyzer

This comment has been minimized.

Co-authored-by: León Orell Valerian Liehr <[email protected]>
@Noratrieb
Copy link
Member Author

The warning displayed in rustdoc
looks nice

@bors r=fee1-dead

@bors
Copy link
Contributor

bors commented Aug 22, 2023

📌 Commit d16e9c3 has been approved by fee1-dead

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 22, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 22, 2023
…mpiler-errors

Rollup of 6 pull requests

Successful merges:

 - rust-lang#114959 (fix rust-lang#113702 emit a proper diagnostic message for unstable lints passed from CLI)
 - rust-lang#115011 (Warn on elided lifetimes in associated constants (`ELIDED_LIFETIMES_IN_ASSOCIATED_CONSTANT`))
 - rust-lang#115077 (Do not emit invalid suggestion in E0191 when spans overlap)
 - rust-lang#115087 (Add disclaimer on size assertion macro)
 - rust-lang#115090 (Always use `os-release` rather than `/lib` to detect `NixOS` (bootstrap))
 - rust-lang#115101 (triagebot: add dependency licensing pings)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3906645 into rust-lang:master Aug 22, 2023
@rustbot rustbot added this to the 1.74.0 milestone Aug 22, 2023
@Noratrieb Noratrieb deleted the sizeassert branch August 23, 2023 07:40
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.

6 participants