rust/tests/run-make/lib-trait-for-trait-no-ice/rmake.rs
Nicholas Nethercote 84ac80f192 Reformat use declarations.
The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
2024-07-29 08:26:52 +10:00

16 lines
552 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 std::path::Path;
use run_make_support::{rust_lib_name, rustc};
fn main() {
rustc().input("foo.rs").crate_type("lib").run();
assert!(Path::new(&rust_lib_name("foo")).exists());
}