Closed
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
Type
Projects
Status
Done