2023-07-05 19:19:31 -05:00
|
|
|
// This test was failing on Linux for a while due to #110393 somehow making
|
|
|
|
// the unused functions not instrumented, but it seems to be fine now.
|
2023-06-12 03:07:04 -05:00
|
|
|
|
|
|
|
// Validates coverage now works with optimizations
|
2024-02-22 06:10:29 -06:00
|
|
|
//@ compile-flags: -C opt-level=3
|
2023-04-19 06:49:47 -05:00
|
|
|
|
2020-12-02 01:01:26 -06:00
|
|
|
#![allow(unused_assignments, unused_variables)]
|
2023-06-12 03:07:04 -05:00
|
|
|
|
2024-02-22 06:10:29 -06:00
|
|
|
//@ aux-build:used_crate.rs
|
2020-12-02 17:39:40 -06:00
|
|
|
extern crate used_crate;
|
2020-12-02 01:01:26 -06:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
used_crate::used_function();
|
|
|
|
let some_vec = vec![1, 2, 3, 4];
|
2020-12-02 17:39:40 -06:00
|
|
|
used_crate::used_only_from_bin_crate_generic_function(&some_vec);
|
|
|
|
used_crate::used_only_from_bin_crate_generic_function("used from bin uses_crate.rs");
|
|
|
|
used_crate::used_from_bin_crate_and_lib_crate_generic_function(some_vec);
|
|
|
|
used_crate::used_with_same_type_from_bin_crate_and_lib_crate_generic_function("interesting?");
|
2020-12-02 01:01:26 -06:00
|
|
|
}
|