summaryrefslogtreecommitdiffstats
path: root/src/test/ui/cross-crate/issue-64872/auxiliary/a_def_obj.rs
blob: 82bb95f1ef2b3ca8e33d9a1f17b9ef4a7d04feb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// compile-flags: -C debuginfo=2

// no-prefer-dynamic
#![crate_type = "rlib"]

pub trait Object { fn method(&self) { } }

impl Object for u32 { }
impl Object for () { }
impl<T> Object for &T { }

pub fn unused() {
    let ref u = 0_u32;
    let _d = &u as &dyn crate::Object;
    _d.method()
}