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 silently fails parsing some doctests when using a playground URL #63016

Closed
ollie27 opened this issue Jul 26, 2019 · 0 comments · Fixed by #67818
Closed

rustdoc silently fails parsing some doctests when using a playground URL #63016

ollie27 opened this issue Jul 26, 2019 · 0 comments · Fixed by #67818
Assignees
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@ollie27
Copy link
Member

ollie27 commented Jul 26, 2019

For example running rustdoc --markdown-playground-url=https://play.rust-lang.org/ foo.md on:

# test

```
# #![feature(async_await)]
use std::future::Future;
use std::pin::Pin;
fn foo_recursive(n: usize) -> Pin<Box<dyn Future<Output = ()>>> {
    Box::pin(async move {
        if n > 0 {
            foo_recursive(n - 1).await;
        }
    })
}
```

results in a 0 byte file and no error messages but a none zero exit code. It should succeed. This has the same root cause as #59313 and #59557 but it only occurs when using a playground URL.

@ollie27 ollie27 added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ C-bug Category: This is a bug. labels Jul 26, 2019
@ollie27 ollie27 self-assigned this Jul 26, 2019
@Centril Centril added A-async-await Area: Async & Await and removed A-async-await Area: Async & Await labels Oct 25, 2019
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Jan 5, 2020
…rror, r=GuillaumeGomez

rustdoc: Avoid panic when parsing codeblocks for playground links

`make_test` is also called when parsing codeblocks for the playground links so it should handle unwinds from the parser internally.

Fixes rust-lang#63016

r? @GuillaumeGomez
@bors bors closed this as completed in 3548d98 Jan 5, 2020
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. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants