6e8a54d0f6
Compute data layout of types cc #4091 Things that aren't working: * Closures * Generators (so no support for `Future` I think) * Opaque types * Type alias and associated types which may need normalization Things that show wrong result: * ~Enums with explicit discriminant~ * SIMD types * ~`NonZero*` and similar standard library items which control layout with special attributes~ At the user level, I didn't put much work, since I wasn't confident about what is the best way to present this information. Currently it shows size and align for ADTs, and size, align, offset for struct fields, in the hover, similar to clangd. I used it some days and I feel I liked it, but we may consider it too noisy and move it to an assist or command. |
||
---|---|---|
.. | ||
body | ||
item_tree | ||
macro_expansion_tests | ||
nameres | ||
path | ||
adt.rs | ||
attr.rs | ||
body.rs | ||
builtin_attr.rs | ||
builtin_type.rs | ||
child_by_source.rs | ||
data.rs | ||
db.rs | ||
dyn_map.rs | ||
expr.rs | ||
find_path.rs | ||
generics.rs | ||
import_map.rs | ||
intern.rs | ||
item_scope.rs | ||
item_tree.rs | ||
keys.rs | ||
lang_item.rs | ||
layout.rs | ||
lib.rs | ||
macro_expansion_tests.rs | ||
nameres.rs | ||
path.rs | ||
per_ns.rs | ||
pretty.rs | ||
resolver.rs | ||
src.rs | ||
test_db.rs | ||
trace.rs | ||
type_ref.rs | ||
visibility.rs |