diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/README.md | 4 | ||||
| -rw-r--r-- | tests/ui/self-profile/pretty_print_no_ice.rs | 14 |
2 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/README.md b/tests/ui/README.md index b635b6326fc..be387e220f6 100644 --- a/tests/ui/README.md +++ b/tests/ui/README.md @@ -1233,6 +1233,10 @@ Exercises sanitizer support. See [Sanitizer | The rustc book](https://doc.rust-l Tests with erroneous ways of using `self`, such as using `this.x` syntax as seen in other languages, having it not be the first argument, or using it in a non-associated function (no `impl` or `trait`). It also contains correct uses of `self` which have previously been observed to cause ICEs. +## `tests/ui/self-profile/`: self-profiling + +Tests related to the self-profiler (`-Zself-profile`) functionality of rustc. + ## `tests/ui/sepcomp/`: Separate Compilation In this directory, multiple crates are compiled, but some of them have `inline` functions, meaning they must be inlined into a different crate despite having been compiled separately. diff --git a/tests/ui/self-profile/pretty_print_no_ice.rs b/tests/ui/self-profile/pretty_print_no_ice.rs new file mode 100644 index 00000000000..71b15e82650 --- /dev/null +++ b/tests/ui/self-profile/pretty_print_no_ice.rs @@ -0,0 +1,14 @@ +// Checks that when we use `-Zself-profile-events=args`, it is possible to pretty print paths +// using `trimmed_def_paths` even without producing diagnostics. +// +// Issue: <https://github.com/rust-lang/rust/issues/144457>. + +//@ compile-flags: -Zself-profile={{build-base}} -Zself-profile-events=args +//@ build-pass + +use std::sync::atomic::AtomicUsize; +use std::sync::atomic::Ordering::Relaxed; + +fn main() { + AtomicUsize::new(0).load(Relaxed); +} |
