File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
compiler/rustc_middle/src/ty Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -3559,11 +3559,11 @@ where
35593559 // which acts much like a [u8].
35603560 //
35613561 // We *do* need to panic for &dyn Trait, even though the layout of dyn Trait is
3562- // size 0 align 1, because &dyn Trait holds a reference to a non-zero sized type,
3563- // which also must be aligned.
3562+ // size 0 align 1, because &dyn Trait holds a reference to the vtable, which
3563+ // must be aligned and dereferenceable .
35643564 //
3565- // This even applies to *const dyn Trait, which holds a reference and therefore
3566- // must be valid, so 1-initialization is not okay there.
3565+ // This even applies to *const dyn Trait, which holds a reference to the vtable
3566+ // and therefore must be valid, so 1-initialization is not okay there.
35673567 //
35683568 // If this bypass didn't exist, old versions of `hyper` with no semver compatible
35693569 // fix (0.11, 0.12, 0.13) would panic, as they make uninit &[u8] and &str.
You can’t perform that action at this time.
0 commit comments