You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<trclass="need head row-odd"><tdclass="need head"><divclass="needs_head line-block">
@@ -140,7 +140,7 @@ <h1>Expressions<a class="headerlink" href="#expressions" title="Link to this hea
140
140
</tr>
141
141
<trclass="need content row-odd"><tdclass="need content" colspan="1"><p>Code must not rely on Rust’s type inference when doing explicit pointer casts via <codeclass="docutils literal notranslate"><spanclass="pre">var</span><spanclass="pre">as</span><spanclass="pre">Type</span></code> or <aclass="reference external" href="https://doc.rust-lang.org/stable/std/?search=core%3A%3Amem%3A%3Atransmute"><codeclass="docutils literal notranslate"><spanclass="pre">core::mem::transmute</span></code></a>.
142
142
Instead, explicitly specify the complete target type in the <codeclass="docutils literal notranslate"><spanclass="pre">as</span></code> expression or <aclass="reference external" href="https://doc.rust-lang.org/stable/std/?search=core%3A%3Amem%3A%3Atransmute"><codeclass="docutils literal notranslate"><spanclass="pre">core::mem::transmute</span></code></a> call expression.</p>
<trclass="need head row-odd"><tdclass="need head"><divclass="needs_head line-block">
@@ -283,7 +283,7 @@ <h1>Expressions<a class="headerlink" href="#expressions" title="Link to this hea
283
283
<p>as either the right operand or the type of the left operand.</p>
284
284
<p><strong>Exception:</strong><codeclass="docutils literal notranslate"><spanclass="pre">as</span></code> may be used with <codeclass="docutils literal notranslate"><spanclass="pre">usize</span></code> as the right operand and an expression of raw pointer
<trclass="need head row-odd"><tdclass="need head"><divclass="needs_head line-block">
@@ -453,7 +453,7 @@ <h1>Expressions<a class="headerlink" href="#expressions" title="Link to this hea
453
453
and any pointer type as the right operand.</p>
454
454
<p><aclass="reference external" href="https://doc.rust-lang.org/stable/std/?search=std%3A%3Amem%3A%3Atransmute"><codeclass="docutils literal notranslate"><spanclass="pre">std::mem::transmute</span></code></a> shall not be used with any numeric type (including floating point types)
455
455
as the argument to the <codeclass="docutils literal notranslate"><spanclass="pre">Src</span></code> parameter, and any pointer type as the argument to the <codeclass="docutils literal notranslate"><spanclass="pre">Dst</span></code> parameter.</p>
<trclass="need head row-odd"><tdclass="need head"><divclass="needs_head line-block">
@@ -577,7 +577,7 @@ <h1>Expressions<a class="headerlink" href="#expressions" title="Link to this hea
577
577
</tr>
578
578
<trclass="need content row-odd"><tdclass="need content" colspan="1"><p>An expression of numeric type shall not be converted to a pointer if the resulting pointer
579
579
is incorrectly aligned, does not point to an entity of the referenced type, or is an invalid representation.</p>
0 commit comments