Skip to content

Doc test bug: recognize /// - a as doctest #104810

Closed as not planned
Closed as not planned
@gwy15

Description

@gwy15

I tried this code:

/// comment
///
/// -               panic!()
pub fn f() {}

I expected to see this happen when running cargo test: nothing

Instead, this happened: thread 'main' panicked at 'explicit panic', src/lib.rs:3:1

Meta

rustc --version --verbose:

rustc 1.65.0 (897e37553 2022-11-02)
binary: rustc
commit-hash: 897e37553bba8b42751c67658967889d11ecd120
commit-date: 2022-11-02
host: aarch64-apple-darwin
release: 1.65.0
LLVM version: 15.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions