diff options
| author | bors <bors@rust-lang.org> | 2023-04-22 00:10:44 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-04-22 00:10:44 +0000 |
| commit | 80a2ec49a4ffb7a351c41c8db14711297324b587 (patch) | |
| tree | 32a089a87caf1bc9e30b08dcf2ce8d8e50bfc73a /compiler/rustc_mir_transform/src | |
| parent | 0fd50f3e019dddc47d1d6dbe35c4c1542098d9c5 (diff) | |
| parent | 99abe44135e84de2029186384c3ffbd1ad860cca (diff) | |
| download | rust-80a2ec49a4ffb7a351c41c8db14711297324b587.tar.gz rust-80a2ec49a4ffb7a351c41c8db14711297324b587.zip | |
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)
Diffstat (limited to 'compiler/rustc_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/separate_const_switch.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_mir_transform/src/separate_const_switch.rs b/compiler/rustc_mir_transform/src/separate_const_switch.rs index ef367faf6a7..2479856b727 100644 --- a/compiler/rustc_mir_transform/src/separate_const_switch.rs +++ b/compiler/rustc_mir_transform/src/separate_const_switch.rs @@ -303,8 +303,7 @@ fn find_determining_place<'tcx>( | Rvalue::NullaryOp(_, _) | Rvalue::ShallowInitBox(_, _) | Rvalue::UnaryOp(_, Operand::Constant(_)) - | Rvalue::Cast(_, Operand::Constant(_), _) - => return None, + | Rvalue::Cast(_, Operand::Constant(_), _) => return None, } } |
