mirror of https://github.com/rust-lang/rust
24 lines
356 B
Rust
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 {}
|