diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs index 1f7b317a45b..41565019c6b 100644 --- a/src/librustdoc/html/render/print_item.rs +++ b/src/librustdoc/html/render/print_item.rs @@ -1537,10 +1537,19 @@ fn document_ty_layout(w: &mut Buffer, cx: &Context<'_>, ty_def_id: DefId) { let ty = cx.tcx().type_of(ty_def_id); match cx.tcx().layout_of(param_env.and(ty)) { Ok(ty_layout) => { - writeln!(w, r#"
Note: Most layout information is \
+ completely unstable and may be different between compiler versions. \
+ The only exception is types with certain repr(...)
attributes. \
+ Please see the Rust Reference’s \
+ “Type Layout” \
+ chapter for details on type layout guarantees.
Size: (unsized)
"); } else { writeln!( w,