2019-10-10 19:00:00 -05:00
|
|
|
// needs-sanitizer-support
|
2020-06-04 19:00:00 -05:00
|
|
|
// needs-sanitizer-address
|
2019-10-10 19:00:00 -05:00
|
|
|
// compile-flags: --test -Z sanitizer=address
|
|
|
|
//
|
|
|
|
// #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.
|
|
|
|
|
|
|
|
/// ```
|
2020-09-01 16:12:52 -05:00
|
|
|
/// extern "C" {
|
2019-10-10 19:00:00 -05:00
|
|
|
/// fn __sanitizer_print_stack_trace();
|
|
|
|
/// }
|
|
|
|
///
|
|
|
|
/// fn main() {
|
|
|
|
/// unsafe { __sanitizer_print_stack_trace() };
|
|
|
|
/// }
|
|
|
|
/// ```
|
|
|
|
pub fn z_flag_is_passed_to_rustc() {}
|