1
Fork 0
rust/compiler/rustc_middle/src
bors 80a2ec49a4 Auto merge of #106934 - DrMeepster:offset_of, r=WaffleLapkin
Add offset_of! macro (RFC 3308)

Implements https://github.com/rust-lang/rfcs/pull/3308 (tracking issue #106655) by adding the built in macro `core::mem::offset_of`. Two of the future possibilities are also implemented:

* Nested field accesses (without array indexing)
* DST support (for `Sized` fields)

I wrote this a few months ago, before the RFC merged. Now that it's merged, I decided to rebase and finish it.

cc `@thomcc` (RFC author)
2023-04-22 00:10:44 +00:00
..
dep_graph Store hashes in special types so they aren't accidentally encoded as numbers 2023-04-18 10:52:47 -04:00
hir Remove some unnecessary hash truncations 2023-04-16 20:05:02 -04:00
infer Rollup merge of #110386 - nnethercote:clean-up-traversal-macros, r=lcnr 2023-04-17 18:13:35 +02:00
middle Store hashes in special types so they aren't accidentally encoded as numbers 2023-04-18 10:52:47 -04:00
mir Auto merge of #106934 - DrMeepster:offset_of, r=WaffleLapkin 2023-04-22 00:10:44 +00:00
query rustc_metadata: Split children into multiple tables 2023-04-21 14:38:59 +03:00
thir offset_of 2023-04-21 02:14:02 -07:00
traits Rollup merge of #110124 - Nilstrieb:📎-told-me-so, r=compiler-errors 2023-04-10 14:13:16 +05:30
ty Auto merge of #106934 - DrMeepster:offset_of, r=WaffleLapkin 2023-04-22 00:10:44 +00:00
util Move some utils out of rustc_const_eval 2023-04-16 12:05:54 +02:00
arena.rs add EarlyBinder to return type of collect_return_position_impl_trait_in_trait_tys query; remove bound_X version 2023-04-18 16:33:06 -06:00
error.rs fix(middle): emit error rather than delay bug when reaching limit 2023-04-03 11:08:14 +08:00
lib.rs Add rustc_fluent_macro to decouple fluent from rustc_macros 2023-04-18 18:56:22 +00:00
lint.rs create helper function for rustc_lint_defs::Level and remove it's duplicated code r=ozkanonur 2023-01-10 10:56:17 +03:00
macros.rs Simplify CloneLiftImpls and TrivialTypeTraversalImpls. 2023-04-16 14:19:50 +10:00
metadata.rs rustc_metadata: Remove Span from ModChild 2023-04-18 17:25:04 +03:00
tests.rs
thir.rs Auto merge of #106934 - DrMeepster:offset_of, r=WaffleLapkin 2023-04-22 00:10:44 +00:00
values.rs rustc_middle: Remove trait DefIdTree 2023-03-02 23:46:44 +04:00