rust/tests/ui/issues/auxiliary/issue-38226-aux.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
356 B
Rust
Raw Normal View History

#![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 {}