-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Doc test containing code before main function fails to compile on beta #139651
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
Comments
Workaround for rust-lang/rust#139651
Likely #138104 but I haven't run a bisection yet. |
I'm surprised that this code used to work actually |
@fmease it used to be that if the code didn't compile at the top level, rustdoc would shove it in a |
Oof, oh no. Okay :/ |
Arf, I wish I saw the comment about the duplicate issue before investigating. Well anyway, I said the same as what |
Opened #140220. |
…ng, r=fmease Fix detection of main function if there are expressions around it Fixes rust-lang#140162. Fixes rust-lang#139651. Once this is merged, we can backport and I'll send a follow-up to emit a warning in case a `main` function is about to be "wrapped" (and therefore not run). r? `@fmease`
…ng, r=fmease Fix detection of main function if there are expressions around it Fixes rust-lang#140162. Fixes rust-lang#139651. Once this is merged, we can backport and I'll send a follow-up to emit a warning in case a `main` function is about to be "wrapped" (and therefore not run). r? ``@fmease``
…, r=<try> Fix detection of main function if there are expressions around it Fixes rust-lang#140162. Fixes rust-lang#139651. Once this is merged, we can backport and I'll send a follow-up to emit a warning in case a `main` function is about to be "wrapped" (and therefore not run). r? `@fmease` try-job: x86_64-gnu-aux
…, r=<try> Fix detection of main function if there are expressions around it Fixes rust-lang#140162. Fixes rust-lang#139651. Once this is merged, we can backport and I'll send a follow-up to emit a warning in case a `main` function is about to be "wrapped" (and therefore not run). r? `@fmease` try-job: x86_64-gnu-aux
…ng, r=fmease Fix detection of main function if there are expressions around it Fixes rust-lang#140162. Fixes rust-lang#139651. Once this is merged, we can backport and I'll send a follow-up to emit a warning in case a `main` function is about to be "wrapped" (and therefore not run). r? `@fmease` try-job: x86_64-gnu-aux
…ng, r=fmease Fix detection of main function if there are expressions around it Fixes rust-lang#140162. Fixes rust-lang#139651. Once this is merged, we can backport and I'll send a follow-up to emit a warning in case a `main` function is about to be "wrapped" (and therefore not run). r? ``@fmease`` try-job: x86_64-gnu-aux
…ng, r=fmease Fix detection of main function if there are expressions around it Fixes rust-lang#140162. Fixes rust-lang#139651. Once this is merged, we can backport and I'll send a follow-up to emit a warning in case a `main` function is about to be "wrapped" (and therefore not run). r? ```@fmease``` try-job: x86_64-gnu-aux
…, r=<try> Fix detection of main function if there are expressions around it Fixes rust-lang#140162. Fixes rust-lang#139651. Once this is merged, we can backport and I'll send a follow-up to emit a warning in case a `main` function is about to be "wrapped" (and therefore not run). r? `@fmease` try-job: x86_64-mingw-1
Rollup merge of rust-lang#140220 - GuillaumeGomez:doctest-main-wrapping, r=fmease Fix detection of main function if there are expressions around it Fixes rust-lang#140162. Fixes rust-lang#139651. Once this is merged, we can backport and I'll send a follow-up to emit a warning in case a `main` function is about to be "wrapped" (and therefore not run). r? `@fmease` try-job: x86_64-mingw-1
I tried this code:
With Rust 1.86.0, running
cargo test
compiles and runs the doctest successfully.On the beta channel, the doctest fails to compile:
Meta
rustc +beta --version --verbose
:The text was updated successfully, but these errors were encountered: