mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 20:23:59 +00:00
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 {}
|