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 documents items inside expressions when ran on binary crates #112085

Open
rodrimati1992 opened this issue May 29, 2023 · 1 comment
Open
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@rodrimati1992
Copy link
Contributor

rodrimati1992 commented May 29, 2023

I tried running cargo doc on this binary crate:

const A: u8 = {const B: u8 = 0; B};
fn main() {}

I expected to see this happen: only the A constant and main functions are documented

Instead, this happened: All of A, B, and main are documented:
image

Meta

rustc --version --verbose:

rustc 1.69.0 (84c898d65 2023-04-16)
binary: rustc
commit-hash: 84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc
commit-date: 2023-04-16
host: x86_64-unknown-linux-gnu
release: 1.69.0
LLVM version: 15.0.7

@rodrimati1992 rodrimati1992 added the C-bug Category: This is a bug. label May 29, 2023
rodrimati1992 added a commit to rodrimati1992/const_format_crates that referenced this issue May 29, 2023
@eval-exec
Copy link
Contributor

B won't documented by 1.72.0-nightly. I don't known which commit cause this.

@jyn514 jyn514 added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jun 1, 2023
kodiakhq bot referenced this issue in X-oss-byte/Nextjs Sep 22, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [const_format](https://togithub.com/rodrimati1992/const_format_crates) | dependencies | patch | `0.2.30` -> `0.2.31` |

---

### Release Notes

<details>
<summary>rodrimati1992/const_format_crates (const_format)</summary>

### [`v0.2.31`](https://togithub.com/rodrimati1992/const_format_crates/blob/HEAD/Changelog.md#0231)

Added a workaround for rustdoc bug ([https://github.com/rust-lang/rust/issues/112085](https://togithub.com/rust-lang/rust/issues/112085)).

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/sammyfilly/Nextjs).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. 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