Skip to content

Run doctest fails if the path include generic types #19319

@garro95

Description

@garro95

This is related to emacs-rustic/rustic#92

rust-analyzer version: 1.85.0

rustc version: 1.85.0

editor or extension: Emacs rustic (lsp-mode)

relevant settings: Nothing relevant

repository link (if public, optional): priority-queue
code snippet to reproduce: See the doctest at priority_queue::PriorityQueue::push

The command provided by Rust analyzer for the Run Doctest button does not work properly if the type where the doctest is includes generic types.

This is probably due to the command not properly escaping the <, > characters.

The output is:

cargo test --doc --package priority-queue -- priority_queue::PriorityQueue<I,P,H>::push --show-output
/bin/bash: line 1: I,P,H: No such file or directory

Compilation exited abnormally with code 1 at Mon Mar  3 23:16:28, duration 0.04 s

After opening the issue in the rustic repository, I was suggested that the fix should be provided in either rust-analyzer or lsp-mode

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions