rust-lang/cargo — pull request #698 by eagleflo (2014-10-13 00:28:49+00:00)
Title: Check crate name for invalid characters in cargo new

Crate names have tight restrictions in Rust. `cargo new` should not allow invalid characters in crate names, as such crates will just fail to compile later on.

This check is based on the one found in rustc's `validate_crate_name` (https://github.com/rust-lang/rust/blob/master/src/librustc/metadata/creader.rs#L185-L189).