File tree 1 file changed +4
-4
lines changed
compiler/rustc_middle/src/ty
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -3559,11 +3559,11 @@ where
3559
3559
// which acts much like a [u8].
3560
3560
//
3561
3561
// 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 .
3564
3564
//
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.
3567
3567
//
3568
3568
// If this bypass didn't exist, old versions of `hyper` with no semver compatible
3569
3569
// 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