File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change
1
+ # Changelog
2
+
3
+ ## Version 0.3.0
4
+
5
+ * Added ` setup_version_info!(); ` macro for automated scripts.
6
+ * ` get_version_info!() ` no longer requires the user to import ` rustc_tools_util::VersionInfo ` and ` std::env `
Original file line number Diff line number Diff line change @@ -13,10 +13,10 @@ build = "build.rs"
13
13
List rustc_tools_util as regular AND build dependency.
14
14
```` toml
15
15
[dependencies ]
16
- rustc_tools_util = " 0.2.1 "
16
+ rustc_tools_util = " 0.3.0 "
17
17
18
18
[build-dependencies ]
19
- rustc_tools_util = " 0.2.1 "
19
+ rustc_tools_util = " 0.3.0 "
20
20
````
21
21
22
22
In ` build.rs ` , generate the data in your ` main() `
@@ -44,6 +44,9 @@ This gives the following output in clippy:
44
44
This project is part of the rust-lang/rust-clippy repository. The source code
45
45
can be found under ` ./rustc_tools_util/ ` .
46
46
47
+ The changelog for ` rustc_tools_util ` is available under:
48
+ [ ` rustc_tools_util/CHANGELOG.md ` ] ( https://github.com/rust-lang/rust-clippy/blob/master/rustc_tools_util/CHANGELOG.md )
49
+
47
50
## License
48
51
49
52
Copyright 2014-2022 The Rust Project Developers
Original file line number Diff line number Diff line change 1
1
#![ cfg_attr( feature = "deny-warnings" , deny( warnings) ) ]
2
2
3
- use std:: env;
4
-
5
3
/// This macro creates the version string during compilation from the
6
4
/// current environment
7
5
#[ macro_export]
@@ -121,7 +119,7 @@ pub fn get_commit_date() -> Option<String> {
121
119
122
120
#[ must_use]
123
121
pub fn get_channel ( ) -> String {
124
- match env:: var ( "CFG_RELEASE_CHANNEL" ) {
122
+ match std :: env:: var ( "CFG_RELEASE_CHANNEL" ) {
125
123
Ok ( channel) => channel,
126
124
Err ( _) => {
127
125
// if that failed, try to ask rustc -V, do some parsing and find out
You can’t perform that action at this time.
0 commit comments