diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-07-04 18:16:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-04 18:16:25 +0200 |
| commit | 6f43a02c120ef63e00f8a5d7267674bcf4c747b2 (patch) | |
| tree | cd64fdbe63b3ada7586cecd175ef52ee1d7c3930 | |
| parent | c091d09b049390f3c5d5002883efea8ac7475f26 (diff) | |
| parent | 12f29e991a4eef962d315b45d24c784b4c5b987e (diff) | |
| download | rust-6f43a02c120ef63e00f8a5d7267674bcf4c747b2.tar.gz rust-6f43a02c120ef63e00f8a5d7267674bcf4c747b2.zip | |
Rollup merge of #127309 - its-the-shrimp:jsondocck_add_file_var, r=aDotInTheVoid
jsondocck: add `$FILE` built-in variable This built-in variable will allow accessing the full path to the currently tested file and allow to test things like source code spans generated by rustdoc-json, and that is exactly the reason why I've come up with the idea to add this [futher discussion on zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/rustdoc-json.20test.20help/near/449039819)
| -rw-r--r-- | src/tools/jsondocck/src/cache.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/jsondocck/src/cache.rs b/src/tools/jsondocck/src/cache.rs index 50697d46b8c..5f72bd171a1 100644 --- a/src/tools/jsondocck/src/cache.rs +++ b/src/tools/jsondocck/src/cache.rs @@ -23,7 +23,7 @@ impl Cache { Cache { value: serde_json::from_str::<Value>(&content).expect("failed to convert from JSON"), - variables: HashMap::new(), + variables: HashMap::from([("FILE".to_owned(), config.template.clone().into())]), } } |
