<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Coercion on ErrorVault — Developer Error Code Dictionary</title><link>https://errorvault.dev/tags/coercion/</link><description>Recent content in Coercion on ErrorVault — Developer Error Code Dictionary</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 26 Apr 2026 05:32:04 +0800</lastBuildDate><atom:link href="https://errorvault.dev/tags/coercion/feed.xml" rel="self" type="application/rss+xml"/><item><title>Fix E0067: illegal erase coercion</title><link>https://errorvault.dev/rust/rust-e0067-illegal-erase-coercion/</link><pubDate>Sun, 26 Apr 2026 05:32:04 +0800</pubDate><guid>https://errorvault.dev/rust/rust-e0067-illegal-erase-coercion/</guid><description>&lt;h1 id="fix-e0067-illegal-erase-coercion">Fix E0067: illegal erase coercion&lt;/h1>
&lt;p>Error &lt;code>E0067&lt;/code> is a Rust compiler error that signals an attempt to perform an illegal &amp;ldquo;erase&amp;rdquo; coercion. In Rust&amp;rsquo;s type system, certain type conversions are allowed implicitly (coercions), but others are not. This error occurs when you try to erase a lifetime or otherwise remove type information in a way that Rust&amp;rsquo;s coercion system does not permit.&lt;/p>
&lt;h2 id="1-symptoms">1. Symptoms&lt;/h2>
&lt;h2 id="when-e0067-occurs-you-will-see-output-similar-to-this">When &lt;code>E0067&lt;/code> occurs, you will see output similar to this:&lt;/h2>
&lt;p>error[E0067]: illegal erase coercion
&amp;ndash;&amp;gt; src/main.rs:10:12
|
10 | let g: fn() = f;
| ^^^^
|
= note: this error was previously described as &amp;ldquo;illegal erase coercion&amp;rdquo;&lt;/p></description></item></channel></rss>