Skip to content

A tab before an opening ``` panics doc tests #29268

Closed
@Stebalien

Description

@Stebalien

When a tab appears between /// and ``` in documentation code examples:

///<tab>```
///<tab>println!("here");
///<tab>```

The doc tests fail with:

<stdin>:2:5: 2:6 error: unknown start of token: `
<stdin>:2     ```
              ^
thread '<unnamed>' panicked at 'Box<Any>', ../src/libsyntax/parse/lexer/mod.rs:167

The worst part is that this tab looks like a space when tabwidth is set to 4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions