|
|
|
@ -287,6 +287,9 @@ void UpbGeneratedMessageTraitImpls(Context& ctx, const Descriptor& msg) { |
|
|
|
|
unsafe impl $pbr$::AssociatedMiniTable for $Msg$ { |
|
|
|
|
#[inline(always)] |
|
|
|
|
fn mini_table() -> *const $pbr$::upb_MiniTable { |
|
|
|
|
// This is unsafe only for Rust 1.80 and below and thus can be dropped
|
|
|
|
|
// once our MSRV is 1.81+
|
|
|
|
|
#[allow(unused_unsafe)] |
|
|
|
|
unsafe { |
|
|
|
|
$std$::ptr::addr_of!($minitable$) |
|
|
|
|
} |
|
|
|
@ -296,6 +299,9 @@ void UpbGeneratedMessageTraitImpls(Context& ctx, const Descriptor& msg) { |
|
|
|
|
unsafe impl $pbr$::AssociatedMiniTable for $Msg$View<'_> { |
|
|
|
|
#[inline(always)] |
|
|
|
|
fn mini_table() -> *const $pbr$::upb_MiniTable { |
|
|
|
|
// This is unsafe only for Rust 1.80 and below and thus can be dropped
|
|
|
|
|
// once our MSRV is 1.81+
|
|
|
|
|
#[allow(unused_unsafe)] |
|
|
|
|
unsafe { |
|
|
|
|
$std$::ptr::addr_of!($minitable$) |
|
|
|
|
} |
|
|
|
@ -305,6 +311,9 @@ void UpbGeneratedMessageTraitImpls(Context& ctx, const Descriptor& msg) { |
|
|
|
|
unsafe impl $pbr$::AssociatedMiniTable for $Msg$Mut<'_> { |
|
|
|
|
#[inline(always)] |
|
|
|
|
fn mini_table() -> *const $pbr$::upb_MiniTable { |
|
|
|
|
// This is unsafe only for Rust 1.80 and below and thus can be dropped
|
|
|
|
|
// once our MSRV is 1.81+
|
|
|
|
|
#[allow(unused_unsafe)] |
|
|
|
|
unsafe { |
|
|
|
|
$std$::ptr::addr_of!($minitable$) |
|
|
|
|
} |
|
|
|
|