rust/test-cargo-miri/src/lib.rs

28 lines
563 B
Rust
Raw Normal View History

/// Doc-test test
/// ```rust
/// assert!(cargo_miri_test::make_true());
/// ```
/// ```rust,no_run
/// assert!(!cargo_miri_test::make_true());
/// ```
/// ```rust,compile_fail
/// assert!(cargo_miri_test::make_true() == 5);
/// ```
2021-04-15 16:19:23 -05:00
#[no_mangle]
pub fn make_true() -> bool {
issue_1567::use_the_dependency();
issue_1705::use_the_dependency();
issue_1760::use_the_dependency!();
issue_1691::use_me()
}
2021-04-30 05:50:40 -05:00
2021-11-14 11:16:03 -06:00
/// ```rust
/// cargo_miri_test::miri_only_fn();
/// ```
#[cfg(miri)]
pub fn miri_only_fn() {}
2021-04-30 05:50:40 -05:00
pub fn main() {
println!("imported main");
}