diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/auxiliary/issue-38226-aux.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/ui/issues/auxiliary/issue-38226-aux.rs b/src/test/ui/issues/auxiliary/issue-38226-aux.rs new file mode 100644 index 000000000..f96801719 --- /dev/null +++ b/src/test/ui/issues/auxiliary/issue-38226-aux.rs @@ -0,0 +1,23 @@ +#![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 {} |