bors 146dafa262 Auto merge of #114208 - GKFX:offset_of_enum, r=wesleywiser
Support enum variants in offset_of!

This MR implements support for navigating through enum variants in `offset_of!`, placing the enum variant name in the second argument to `offset_of!`. The RFC placed it in the first argument, but I think it interacts better with nested field access in the second, as you can then write things like

```rust
offset_of!(Type, field.Variant.field)
```

Alternatively, a syntactic distinction could be made between variants and fields (e.g. `field::Variant.field`) but I'm not convinced this would be helpful.

[RFC 3308 # Enum Support](https://rust-lang.github.io/rfcs/3308-offset_of.html#enum-support-offset_ofsomeenumstructvariant-field_on_variant)
Tracking Issue #106655.
2023-11-01 14:17:56 +00:00
..
2023-10-20 21:10:38 +00:00
2023-10-20 21:14:01 +00:00
2023-10-20 21:14:01 +00:00
2023-10-30 23:46:27 +00:00
2023-10-20 21:14:01 +00:00
2023-10-21 12:14:17 +00:00
2023-10-20 21:10:38 +00:00
2023-10-31 23:41:40 +00:00
2023-10-31 11:44:23 +00:00
2023-10-20 21:14:01 +00:00
2023-10-05 18:56:30 +03:00
2023-10-30 23:46:27 +00:00
2023-10-20 21:14:01 +00:00