Skip to content

[1.38] Regression: expected one of !, ., ::, ;, ?, {, }, or an operator, found is #63890

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
petrochenkov opened this issue Aug 25, 2019 · 4 comments
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Milestone

Comments

@petrochenkov
Copy link
Contributor

#63628 (comment)

expected one of !, ., ::, ;, ?, {, }, or an operator, found is

./reg/google-games1/1.0.10+20190627/beta-2019-08-13.txt:[INFO] [stdout] error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `is`

Minimized reproduction, run with rustdoc --test (all the whitespace is important!):

/// #
///
///     ident ident
fn f() {}

Apparently something makes this comment look like code to rustdoc, so it tries to doctest it.

Actually, stable rustdoc also gives an error for this, from what I tried locally, not sure why it passed on crater.
cc @rust-lang/rustdoc

@shepmaster explains what happens in #63628 (comment).

@petrochenkov petrochenkov added regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 25, 2019
@Mark-Simulacrum Mark-Simulacrum added this to the 1.38 milestone Aug 30, 2019
@GuillaumeGomez
Copy link
Member

It's not a bug, it's markdown, litterally. Like @shepmaster wrote, it's considered as a code block.

@Aloso
Copy link
Contributor

Aloso commented Aug 31, 2019

@GuillaumeGomez it's a code block, but it's not a doctest, it might not even be Rust syntax.

Doctests can only be written with the

```
```

syntax.

@GuillaumeGomez
Copy link
Member

No:

/// # Foo
///
///     let x = 12;
///
/// indeed
///
/// ``````
/// println!("foo");
/// ``````
pub fn foo() {}

Running with rustdoc --test, I had two tests.

@Mark-Simulacrum
Copy link
Member

Closing as won't fix / expected breakage.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. 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

4 participants