2024-06-14 11:08:43 -05:00
|
|
|
// 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
|
|
|
|
|
2024-06-17 12:23:53 -05:00
|
|
|
use std::path::Path;
|
2024-06-14 11:08:43 -05:00
|
|
|
|
2024-06-17 12:23:53 -05:00
|
|
|
use run_make_support::{rust_lib_name, rustc};
|
2024-07-28 17:13:50 -05:00
|
|
|
|
2024-06-14 11:08:43 -05:00
|
|
|
fn main() {
|
|
|
|
rustc().input("foo.rs").crate_type("lib").run();
|
2024-06-17 12:23:53 -05:00
|
|
|
assert!(Path::new(&rust_lib_name("foo")).exists());
|
2024-06-14 11:08:43 -05:00
|
|
|
}
|