Skip to content

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

Closed
@huonw

Description

@huonw

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 }
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions