1 // compile-flags:-Zprint-mono-items=eager
2 // compile-flags:-Zinline-in-all-cgus
5 #![feature(coerce_unsized)]
9 use std::marker::Unsize;
10 use std::ops::CoerceUnsized;
26 struct Struct<T: ?Sized> {
36 // Custom Coercion Case
41 #[derive(Clone, Copy)]
42 struct Wrapper<T: ?Sized>(*const T);
44 impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Wrapper<U>> for Wrapper<T> {}
46 //~ MONO_ITEM fn start
48 fn start(_: isize, _: *const *const u8) -> isize {
50 let bool_sized = &true;
51 //~ MONO_ITEM fn std::ptr::drop_in_place::<bool> - shim(None) @@ unsizing-cgu.0[Internal]
52 //~ MONO_ITEM fn <bool as Trait>::foo
53 let _bool_unsized = bool_sized as &Trait;
55 let char_sized = &'a';
57 //~ MONO_ITEM fn std::ptr::drop_in_place::<char> - shim(None) @@ unsizing-cgu.0[Internal]
58 //~ MONO_ITEM fn <char as Trait>::foo
59 let _char_unsized = char_sized as &Trait;
62 let struct_sized = &Struct {
67 //~ MONO_ITEM fn std::ptr::drop_in_place::<f64> - shim(None) @@ unsizing-cgu.0[Internal]
68 //~ MONO_ITEM fn <f64 as Trait>::foo
69 let _struct_unsized = struct_sized as &Struct<Trait>;
72 let wrapper_sized = Wrapper(&0u32);
73 //~ MONO_ITEM fn std::ptr::drop_in_place::<u32> - shim(None) @@ unsizing-cgu.0[Internal]
74 //~ MONO_ITEM fn <u32 as Trait>::foo
75 let _wrapper_sized = wrapper_sized as Wrapper<Trait>;