Files
rust/tests/run-make/lib-trait-for-trait-no-ice/rmake.rs
2024-07-08 09:59:08 -04:00

14 lines
511 B
Rust

// Inside a library, implementing a trait for another trait
// with a lifetime used to cause an internal compiler error (ICE).
// This test checks that this bug does not make a resurgence -
// first by ensuring successful compilation, then verifying that
// the lib crate-type flag was actually followed.
// See https://github.com/rust-lang/rust/issues/18943
use run_make_support::{count_rlibs, rustc};
fn main() {
rustc().input("foo.rs").crate_type("lib").run();
assert_eq!(count_rlibs("foo"), 1);
}