about summary refs log tree commit diff
path: root/compiler/rustc_session/src/utils.rs
diff options
context:
space:
mode:
authorMatthias KrΓΌger <matthias.krueger@famsik.de>2024-11-21 11:58:36 +0100
committerGitHub <noreply@github.com>2024-11-21 11:58:36 +0100
commitfe5403f517617e1ecdf1cd3cd33bf205727f92c9 (patch)
treeb7c9380d41a326807565657bda20807f167f0bf0 /compiler/rustc_session/src/utils.rs
parent0b1bf71a71c2a1d34c212285362530ec2c4e4775 (diff)
parent0a14f712d7a2cf42e2e5705b2f5a8f1b8e67c7c2 (diff)
downloadrust-fe5403f517617e1ecdf1cd3cd33bf205727f92c9.tar.gz
rust-fe5403f517617e1ecdf1cd3cd33bf205727f92c9.zip
Rollup merge of #130236 - yaahc:unstable-feature-usage, r=estebank
unstable feature usage metrics

example output

```
test-lib on ξ‚  master [?] is πŸ“¦ v0.1.0 via πŸ¦€ v1.80.1
❯ cat src/lib.rs
───────┬───────────────────────────────────────────────────────
       β”‚ File: src/lib.rs
───────┼───────────────────────────────────────────────────────
   1   β”‚ #![feature(unix_set_mark)]
   2   β”‚ pub fn add(left: u64, right: u64) -> u64 {
   3   β”‚     left + right
   4   β”‚ }
   5   β”‚
   6   β”‚ #[cfg(test)]
   7   β”‚ mod tests {
   8   β”‚     use super::*;
   9   β”‚
  10   β”‚     #[test]
  11   β”‚     fn it_works() {
  12   β”‚         let result = add(2, 2);
  13   β”‚         assert_eq!(result, 4);
  14   β”‚     }
  15   β”‚ }
───────┴───────────────────────────────────────────────────────

test-lib on ξ‚  master [?] is πŸ“¦ v0.1.0 via πŸ¦€ v1.80.1
❯ cargo +stage1 rustc -- -Zmetrics-dir=$PWD/metrics
   Compiling test-lib v0.1.0 (/home/yaahc/tmp/test-lib)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.08s

test-lib on ξ‚  master [?] is πŸ“¦ v0.1.0 via πŸ¦€ v1.80.1
❯ cat metrics/unstable_feature_usage.json
───────┬─────────────────────────────────────────────────────────────────────
       β”‚ File: metrics/unstable_feature_usage.json
───────┼─────────────────────────────────────────────────────────────────────
   1   β”‚ {"lib_features":[{"symbol":"unix_set_mark"}],"lang_features":[]}
   ```

   related to https://github.com/rust-lang/rust/issues/129485
Diffstat (limited to 'compiler/rustc_session/src/utils.rs')
0 files changed, 0 insertions, 0 deletions