]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/sanitizer-option.rs
Rollup merge of #68378 - billyrieger:btreemap-remove-entry, r=KodrAus
[rust.git] / src / test / rustdoc / sanitizer-option.rs
1 // needs-sanitizer-support
2 // compile-flags: --test -Z sanitizer=address
3 //
4 // #43031: Verify that rustdoc passes `-Z` options to rustc. Use an extern
5 // function that is provided by the sanitizer runtime, if flag is not passed
6 // correctly, then linking will fail.
7
8 /// ```
9 /// extern {
10 ///     fn __sanitizer_print_stack_trace();
11 /// }
12 ///
13 /// fn main() {
14 ///     unsafe { __sanitizer_print_stack_trace() };
15 /// }
16 /// ```
17 pub fn z_flag_is_passed_to_rustc() {}