Rollup merge of #22201 - brson:version, r=nick29581

rustc --version says

```
rustc 1.0.0-dev (d0e82a68a 2015-02-05 14:38:56 -0800) (built 2015-02-11)
```
This commit is contained in:
Manish Goregaokar 2015-02-15 18:22:31 +05:30
commit 63091efa3b
2 changed files with 10 additions and 1 deletions

View file

@ -477,6 +477,10 @@ pub fn commit_date_str() -> Option<&'static str> {
option_env!("CFG_VER_DATE")
}
pub fn build_date_str() -> Option<&'static str> {
option_env!("CFG_BUILD_DATE")
}
/// Prints version information and returns None on success or an error
/// message on panic.
pub fn version(binary: &str, matches: &getopts::Matches) {
@ -488,6 +492,7 @@ pub fn version(binary: &str, matches: &getopts::Matches) {
println!("binary: {}", binary);
println!("commit-hash: {}", unw(commit_hash_str()));
println!("commit-date: {}", unw(commit_date_str()));
println!("build-date: {}", unw(build_date_str()));
println!("host: {}", config::host_triple());
println!("release: {}", unw(release_str()));
}