-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-doctestsArea: Documentation tests, run by rustdocArea: Documentation tests, run by rustdocC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Description
The tokio.rs website tests all the code blocks in markdown files by building up a rust file with code included as doc comments on generated functions. The code is generally wrapped in a function to avoid any main functions being interpreted as a test main function. In 1.81, this worked fine, but 1.82 sees the internal main function and treats it as one which prevents the default test main being created.
Code
I tried this code:
/// ```
/// # fn dox() {
/// fn main() {}
/// # }
/// ```
fn foo() {}
I expected to see this happen: cargo test
should succeed
Instead, this happened: cargo test failed
Version it worked on
It most recently worked on: 1.81
rustc --version --verbose
:
rustc 1.82.0 (f6e511eec 2024-10-15)
binary: rustc
commit-hash: f6e511eec7342f59a25f7c0534f1dbea00d01b14
commit-date: 2024-10-15
host: aarch64-apple-darwin
release: 1.82.0
LLVM version: 19.1.1
@rustbot modify labels: +regression-from-stable-to-stable -regression-untriaged
Metadata
Metadata
Assignees
Labels
A-doctestsArea: Documentation tests, run by rustdocArea: Documentation tests, run by rustdocC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Type
Projects
Status
Done