summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/rustc_tools_util/README.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/tools/clippy/rustc_tools_util/README.md
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/clippy/rustc_tools_util/README.md')
-rw-r--r--src/tools/clippy/rustc_tools_util/README.md38
1 files changed, 17 insertions, 21 deletions
diff --git a/src/tools/clippy/rustc_tools_util/README.md b/src/tools/clippy/rustc_tools_util/README.md
index e947f9c7e..eefc661f9 100644
--- a/src/tools/clippy/rustc_tools_util/README.md
+++ b/src/tools/clippy/rustc_tools_util/README.md
@@ -13,43 +13,39 @@ build = "build.rs"
List rustc_tools_util as regular AND build dependency.
````toml
[dependencies]
-rustc_tools_util = "0.2.1"
+rustc_tools_util = "0.3.0"
[build-dependencies]
-rustc_tools_util = "0.2.1"
+rustc_tools_util = "0.3.0"
````
In `build.rs`, generate the data in your `main()`
-````rust
+
+```rust
fn main() {
- println!(
- "cargo:rustc-env=GIT_HASH={}",
- rustc_tools_util::get_commit_hash().unwrap_or_default()
- );
- println!(
- "cargo:rustc-env=COMMIT_DATE={}",
- rustc_tools_util::get_commit_date().unwrap_or_default()
- );
- println!(
- "cargo:rustc-env=RUSTC_RELEASE_CHANNEL={}",
- rustc_tools_util::get_channel().unwrap_or_default()
- );
+ rustc_tools_util::setup_version_info!();
}
-
-````
+```
Use the version information in your main.rs
-````rust
-use rustc_tools_util::*;
+```rust
fn show_version() {
let version_info = rustc_tools_util::get_version_info!();
println!("{}", version_info);
}
-````
+```
+
This gives the following output in clippy:
-`clippy 0.0.212 (a416c5e 2018-12-14)`
+`clippy 0.1.66 (a28f3c8 2022-11-20)`
+
+## Repository
+
+This project is part of the rust-lang/rust-clippy repository. The source code
+can be found under `./rustc_tools_util/`.
+The changelog for `rustc_tools_util` is available under:
+[`rustc_tools_util/CHANGELOG.md`](https://github.com/rust-lang/rust-clippy/blob/master/rustc_tools_util/CHANGELOG.md)
## License