about summary refs log tree commit diff
path: root/tests/rustdoc/sanitizer-option.rs
blob: 7b0038138f09f724392de792e678ea3a52961fe7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//@ needs-sanitizer-support
//@ needs-sanitizer-address
//@ compile-flags: --test -Z sanitizer=address -C unsafe-allow-abi-mismatch=sanitizer
//
// #43031: Verify that rustdoc passes `-Z` options to rustc. Use an extern
// function that is provided by the sanitizer runtime, if flag is not passed
// correctly, then linking will fail.

/// ```
/// extern "C" {
///     fn __sanitizer_print_stack_trace();
/// }
///
/// fn main() {
///     unsafe { __sanitizer_print_stack_trace() };
/// }
/// ```
pub fn z_flag_is_passed_to_rustc() {}