]> git.lizzy.rs Git - rust.git/blob - tests/ui/cross-crate/issue-64872/auxiliary/a_def_obj.rs
Rollup merge of #106644 - alexcrichton:update-wasi-toolchain, r=cuviper
[rust.git] / tests / ui / cross-crate / issue-64872 / auxiliary / a_def_obj.rs
1 // compile-flags: -C debuginfo=2
2
3 // no-prefer-dynamic
4 #![crate_type = "rlib"]
5
6 pub trait Object { fn method(&self) { } }
7
8 impl Object for u32 { }
9 impl Object for () { }
10 impl<T> Object for &T { }
11
12 pub fn unused() {
13     let ref u = 0_u32;
14     let _d = &u as &dyn crate::Object;
15     _d.method()
16 }