Skip to content

rustdoc doesn't support reading from STDIN via the fake path - (dash) #123671

Closed
@fmease

Description

@fmease

While rustc supports reading from STDIN if the fake path - (dash) is provided (a CLI convention), rustdoc does not.

This is definitely not something I need, it's merely an inconsistency between rustc and rustdoc I've noticed and that I'm recording here.

rustc Example

printf 'pub struct F;' | rustc - --crate-type=lib

Crate name: rust_out; virtual file path: <anon>.

Reproducer

printf 'pub struct F;' | rustdoc -

Currently fails with:

error: couldn't read -: No such file or directory (os error 2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-CLIArea: Command-line interface (CLI) to the compilerC-feature-requestCategory: A feature request, i.e: not implemented / a PR.P-lowLow priorityT-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