rust/tests/ui/issues/auxiliary/issue-38226-aux.rs
2023-01-11 09:32:08 +00:00

24 lines
356 B
Rust

#![crate_type="rlib"]
#[inline(never)]
pub fn foo<T>() {
let _: Box<SomeTrait> = Box::new(SomeTraitImpl);
}
pub fn bar() {
SomeTraitImpl.bar();
}
mod submod {
pub trait SomeTrait {
fn bar(&self) {
panic!("NO")
}
}
}
use self::submod::SomeTrait;
pub struct SomeTraitImpl;
impl SomeTrait for SomeTraitImpl {}