-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rewrite dump-mono-stats to rmake format
- Loading branch information
Showing
4 changed files
with
24 additions
and
7 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// A flag named dump-mono-stats was added to the compiler in 2022, which | ||
// collects stats on instantiation of items and their associated costs. | ||
// This test checks that the output stat file exists, and that it contains | ||
// a specific expected string. | ||
// See https://github.com/rust-lang/rust/pull/105481 | ||
|
||
use run_make_support::{cwd, fs_wrapper, rustc}; | ||
|
||
fn main() { | ||
rustc().crate_type("lib").input("foo.rs").dump_mono_stats(cwd()).arg("-Zdump-mono-stats-format=json").run(); | ||
assert!(fs_wrapper::read_to_string("foo.mono_items.json").contains("\"name\":\"bar\""); | ||
} |