You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
structX{a:[u8, .. 1],b:u8}fnmain(){let x = X{a:[0],b:0};let _fixed = &x.aas*mutu8;// let _other = &x.b as *mut _;// let local_fixed = [0u8]; let _v = &local_fixed as *mut _;}
compiles without error. Uncommenting the two similar lines gives the errors I was expecting for _fixed:
<anon>:8:19: 8:23 error: mismatched types: expected `*mut <generic #12>` but found `&u8` (values differ in mutability)
<anon>:8 let _other = &x.b as *mut _;
^~~~
<anon>:9:40: 9:52 error: mismatched types: expected `*mut <generic #14>` but found `&[u8, .. 1]` (values differ in mutability)
<anon>:9 let local_fixed = [0u8]; let _v = &local_fixed as *mut _;
^~~~~~~~~~~~
The text was updated successfully, but these errors were encountered:
Add layout info for enum variant and locals
The size of enum variant is what rustdoc shows (rust-lang#86263). I also added layout info for locals since it helps finding size of unnameable types like closures inside other structs or impl traits.
compiles without error. Uncommenting the two similar lines gives the errors I was expecting for
_fixed
:The text was updated successfully, but these errors were encountered: