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

Rustdoc could allow setting compilation flags for compiling, or just a no_link flag #12903

Closed
huonw opened this issue Mar 15, 2014 · 2 comments
Closed
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@huonw
Copy link
Member

huonw commented Mar 15, 2014

E.g. exhibiting #[no_std]; code normally requires passing extra flags to rustc (because we don't link to libc), so it would be good to be able to just parse, type-check and lint without linking, so that code snippets don't go completely out of date.

Maybe something like

```no_link
#[no_std];
#[start]
fn main(_argc: int, _argv: **u8) -> int { 0 }
```
@alexcrichton
Copy link
Member

Perhaps no_run could imply --no-trans?

@flaper87
Copy link
Contributor

I think I prefer @huonw proposal. That will help keeping the code fence explicit.

matthiaskrgr pushed a commit to matthiaskrgr/rust that referenced this issue Aug 2, 2022
Only run rainbow highlighting test on 64-bit Unix
flip1995 pushed a commit to flip1995/rust that referenced this issue Jun 27, 2024
Fix ICE in `upper_case_acronyms`

fixes rust-lang#12284

The logic has been rewritten to avoid allocations. The old version allocated multiple vecs and strings for each identifier. The new logic allocates a single string only when the lint triggers.

This also no longer lints on strings which don't start with an uppercase letter (e.g. `something_FOO`).

changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants