+
+ // Small hack to force the Sized trait to be present.
+ //
+ // Note that in case of `#![no_core]`, the trait is not available.
+ if let Some(sized_trait_did) = ctxt.tcx.lang_items().sized_trait() {
+ let mut sized_trait = build_external_trait(&mut ctxt, sized_trait_did);
+ sized_trait.is_auto = true;
+ ctxt.external_traits.borrow_mut().insert(sized_trait_did, sized_trait);
+ }
+