-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #129162 - matthiaskrgr:rollup-r0oxdev, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #128990 (Re-enable more debuginfo tests on freebsd) - #129042 (Special-case alias ty during the delayed bug emission in `try_from_lit`) - #129086 (Stabilize `is_none_or`) - #129149 (Migrate `validate_json.py` script to rust in `run-make/rustdoc-map-file` test) - #129154 (Fix wrong source location for some incorrect macro definitions) - #129161 (Stabilize std::thread::Builder::spawn_unchecked) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
20 changed files
with
76 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,54 @@ | ||
use run_make_support::{python_command, rustdoc}; | ||
// This test ensures that all items from `foo` are correctly generated into the `redirect-map.json` | ||
// file with `--generate-redirect-map` rustdoc option. | ||
|
||
use std::path::Path; | ||
|
||
use run_make_support::rfs::read_to_string; | ||
use run_make_support::{path, rustdoc, serde_json}; | ||
|
||
fn main() { | ||
let out_dir = "out"; | ||
let crate_name = "foo"; | ||
rustdoc() | ||
.input("foo.rs") | ||
.crate_name(crate_name) | ||
.arg("-Zunstable-options") | ||
.arg("--generate-redirect-map") | ||
.out_dir(&out_dir) | ||
.run(); | ||
// FIXME (GuillaumeGomez): Port the python script to Rust as well. | ||
python_command().arg("validate_json.py").arg(&out_dir).run(); | ||
|
||
let generated = read_to_string(path(out_dir).join(crate_name).join("redirect-map.json")); | ||
let expected = read_to_string("expected.json"); | ||
let generated: serde_json::Value = | ||
serde_json::from_str(&generated).expect("failed to parse JSON"); | ||
let expected: serde_json::Value = | ||
serde_json::from_str(&expected).expect("failed to parse JSON"); | ||
let expected = expected.as_object().unwrap(); | ||
|
||
let mut differences = Vec::new(); | ||
for (key, expected_value) in expected.iter() { | ||
match generated.get(key) { | ||
Some(value) => { | ||
if expected_value != value { | ||
differences.push(format!( | ||
"values for key `{key}` don't match: `{expected_value:?}` != `{value:?}`" | ||
)); | ||
} | ||
} | ||
None => differences.push(format!("missing key `{key}`")), | ||
} | ||
} | ||
for (key, data) in generated.as_object().unwrap().iter() { | ||
if !expected.contains_key(key) { | ||
differences.push(format!("Extra data not expected: key: `{key}`, data: `{data}`")); | ||
} | ||
} | ||
|
||
if !differences.is_empty() { | ||
eprintln!("Found differences in JSON files:"); | ||
for diff in differences { | ||
eprintln!("=> {diff}"); | ||
} | ||
panic!("Found differences in JSON files"); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
4 changes: 3 additions & 1 deletion
4
tests/crashes/116308.rs → ...const-generics/adt_const_params/116308.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters