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

Move where doc comment meant as comment check #116965

Merged
merged 1 commit into from
Oct 20, 2023

Commits on Oct 20, 2023

  1. Move where doc comment meant as comment check

    The new place makes more sense and covers more cases beyond individual
    statements.
    
    ```
    error: expected one of `.`, `;`, `?`, `else`, or an operator, found doc comment `//!foo
      --> $DIR/doc-comment-in-stmt.rs:25:22
       |
    LL |     let y = x.max(1) //!foo
       |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected one of `.`, `;`, `?`, `else`, or an operator
       |
    help: add a space before `!` to write a regular comment
       |
    LL |     let y = x.max(1) // !foo
       |                        +
    ```
    
    Fix rust-lang#65329.
    estebank committed Oct 20, 2023
    Configuration menu
    Copy the full SHA
    20de5c7 View commit details
    Browse the repository at this point in the history