rust-lang/rust — pull request #17945 by natepisarski (2014-10-11 12:49:22+00:00)
Title: Disable compilation on some extensionless files

This commit prevents the compiler from overwriting certain extensionless source files with a binary.

As it stands, if you have /home/joe/file1:

fn main(){}

and compile it

rustc /home/joe/file1

It will replace the source (file1) with a binary called file1, destroying the source without warning or error.

This commit completely disallows compiling without a file extension, but still allows compiling with an inccorect (i.e not .rs) extension.