rust/crates/hir-def/src
bors 6e8a54d0f6 Auto merge of #13490 - HKalbasi:layout, r=jonas-schievink
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.
2022-12-07 15:22:03 +00:00
..
body ⬆️ rust-analyzer 2022-10-18 09:12:49 +03:00
item_tree ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00
macro_expansion_tests ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00
nameres Parse and collect derive helpers for builtin derive macros 2022-12-06 16:00:46 +09:00
path ⬆️ rust-analyzer 2022-11-01 11:31:31 +02:00
adt.rs Auto merge of #13490 - HKalbasi:layout, r=jonas-schievink 2022-12-07 15:22:03 +00:00
attr.rs ⬆️ rust-analyzer 2022-08-02 09:05:16 +03:00
body.rs ⬆️ rust-analyzer 2022-10-18 09:12:49 +03:00
builtin_attr.rs rename rustc_allocator_nounwind to rustc_nounwind 2022-10-11 22:47:31 +02:00
builtin_type.rs ⬆️ rust-analyzer 2022-08-23 10:05:52 +03:00
child_by_source.rs ⬆️ rust-analyzer 2022-10-11 10:37:35 +03:00
data.rs Resolve macro2's derive helpers in IDE layer 2022-12-06 16:01:20 +09:00
db.rs ⬆️ rust-analyzer 2022-10-11 10:37:35 +03:00
dyn_map.rs
expr.rs ⬆️ rust-analyzer 2022-10-11 10:37:35 +03:00
find_path.rs ⬆️ rust-analyzer 2022-10-11 10:37:35 +03:00
generics.rs ⬆️ rust-analyzer 2022-08-09 07:23:57 +03:00
import_map.rs revert nightly rustfmt formatting that accidentally slipped in 2022-07-25 14:18:30 +02:00
intern.rs
item_scope.rs ⬆️ rust-analyzer 2022-09-20 17:39:17 +03:00
item_tree.rs ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00
keys.rs
lang_item.rs
layout.rs use rustc crates instead of copy paste 2022-12-07 01:59:38 +03:30
lib.rs Compute data layout of types 2022-12-04 00:29:34 +03:30
macro_expansion_tests.rs
nameres.rs Merge commit '65e1dc4d9' into HEAD 2022-11-25 12:58:18 +01:00
path.rs ⬆️ rust-analyzer 2022-11-01 11:31:31 +02:00
per_ns.rs ⬆️ rust-analyzer 2022-08-23 10:05:52 +03:00
pretty.rs ⬆️ rust-analyzer 2022-11-09 21:49:10 +02:00
resolver.rs ⬆️ rust-analyzer 2022-10-11 10:37:35 +03:00
src.rs
test_db.rs ⬆️ rust-analyzer 2022-08-30 14:51:24 +03:00
trace.rs
type_ref.rs ⬆️ rust-analyzer 2022-11-09 21:49:10 +02:00
visibility.rs ⬆️ rust-analyzer 2022-08-09 07:23:57 +03:00