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)
This commit is contained in:
commit
6f43a02c12
1 changed files with 1 additions and 1 deletions
|
@ -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())]),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue