Skip to content

rustc overwrites input file when it has no extension #13019

Closed
@comex

Description

@comex
% echo 'fn main() {}' > test
% rustc test
% ./test # input has been replaced with the output binary

Tested on OS X, af93684. Not that it makes sense to write Rust files with no extension, but if you do, rustc should not overwrite the input file by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions