<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Impl on ErrorVault — Developer Error Code Dictionary</title>
    <link>https://errorvault.dev/tags/impl/</link>
    <description>Recent content in Impl on ErrorVault — Developer Error Code Dictionary</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 06 Aug 2026 12:44:04 +0800</lastBuildDate>
    <atom:link href="https://errorvault.dev/tags/impl/feed.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Fix E0193: Method Has an Incompatible Type for Trait in Rust</title>
      <link>https://errorvault.dev/rust/rust-e0193-method-incompatible-trait-type/</link>
      <pubDate>Thu, 06 Aug 2026 12:44:04 +0800</pubDate>
      <guid>https://errorvault.dev/rust/rust-e0193-method-incompatible-trait-type/</guid>
      <description>&lt;h2 id=&#34;1-symptoms&#34;&gt;1. Symptoms&lt;/h2&gt;&#xA;&lt;p&gt;When the Rust compiler encounters error E0193, you will see an error message similar to the following in your build output:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-mysql&#34; data-lang=&#34;mysql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;error[E0193]: method &lt;span style=&#34;color:#ff79c6&#34;&gt;`&lt;/span&gt;method_name&lt;span style=&#34;color:#ff79c6&#34;&gt;`&lt;/span&gt; has an incompatible type &lt;span style=&#34;color:#ff79c6&#34;&gt;for&lt;/span&gt; trait &lt;span style=&#34;color:#ff79c6&#34;&gt;`&lt;/span&gt;TraitName&lt;span style=&#34;color:#ff79c6&#34;&gt;`&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#ff79c6&#34;&gt;--&amp;gt;&lt;/span&gt; src&lt;span style=&#34;color:#ff79c6&#34;&gt;/&lt;/span&gt;lib.rs:&lt;span style=&#34;color:#bd93f9&#34;&gt;12&lt;/span&gt;:&lt;span style=&#34;color:#bd93f9&#34;&gt;1&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   &lt;span style=&#34;color:#ff79c6&#34;&gt;|&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bd93f9&#34;&gt;12&lt;/span&gt; &lt;span style=&#34;color:#ff79c6&#34;&gt;|&lt;/span&gt;   fn &lt;span style=&#34;color:#50fa7b&#34;&gt;method_name&lt;/span&gt;(&lt;span style=&#34;color:#ff79c6&#34;&gt;&amp;amp;&lt;/span&gt;self) &lt;span style=&#34;color:#ff79c6&#34;&gt;-&amp;gt;&lt;/span&gt; ReturnType {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   &lt;span style=&#34;color:#ff79c6&#34;&gt;|&lt;/span&gt;   &lt;span style=&#34;color:#ff79c6&#34;&gt;^&lt;/span&gt; expected &lt;span style=&#34;color:#ff79c6&#34;&gt;`&lt;/span&gt;&lt;span style=&#34;color:#50fa7b&#34;&gt;fn&lt;/span&gt;(&lt;span style=&#34;color:#ff79c6&#34;&gt;&amp;amp;&lt;/span&gt;self) &lt;span style=&#34;color:#ff79c6&#34;&gt;-&amp;gt;&lt;/span&gt; ExpectedType&lt;span style=&#34;color:#ff79c6&#34;&gt;`&lt;/span&gt;, found &lt;span style=&#34;color:#ff79c6&#34;&gt;`&lt;/span&gt;&lt;span style=&#34;color:#50fa7b&#34;&gt;fn&lt;/span&gt;(&lt;span style=&#34;color:#ff79c6&#34;&gt;&amp;amp;&lt;/span&gt;self) &lt;span style=&#34;color:#ff79c6&#34;&gt;-&amp;gt;&lt;/span&gt; FoundType&lt;span style=&#34;color:#ff79c6&#34;&gt;`&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   &lt;span style=&#34;color:#ff79c6&#34;&gt;|&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   &lt;span style=&#34;color:#ff79c6&#34;&gt;=&lt;/span&gt; note: expected due &lt;span style=&#34;color:#ff79c6&#34;&gt;to&lt;/span&gt; the trait definition&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The error manifests when implementing a trait method where the method signature diverges from the trait definition. You may observe the following indicators:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fix E0390: Rust Method Self Parameter Mismatch Between Trait and Implementation</title>
      <link>https://errorvault.dev/rust/rust-e0390-method-self-parameter-mismatch/</link>
      <pubDate>Fri, 31 Jul 2026 05:32:04 +0800</pubDate>
      <guid>https://errorvault.dev/rust/rust-e0390-method-self-parameter-mismatch/</guid>
      <description>&lt;h2 id=&#34;1-symptoms&#34;&gt;1. Symptoms&lt;/h2&gt;&#xA;&lt;p&gt;When the Rust compiler encounters error E0390, it produces a diagnostic message that clearly indicates a mismatch between the trait definition and its implementation. The compiler output typically appears as follows:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-mysql&#34; data-lang=&#34;mysql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;error[E0390]: method &lt;span style=&#34;color:#ff79c6&#34;&gt;`&lt;/span&gt;method_name&lt;span style=&#34;color:#ff79c6&#34;&gt;`&lt;/span&gt; has a &lt;span style=&#34;color:#ff79c6&#34;&gt;`&amp;amp;&lt;/span&gt;self&lt;span style=&#34;color:#ff79c6&#34;&gt;`&lt;/span&gt; declaration &lt;span style=&#34;color:#ff79c6&#34;&gt;in&lt;/span&gt; the impl, but &lt;span style=&#34;color:#ff79c6&#34;&gt;not&lt;/span&gt; &lt;span style=&#34;color:#ff79c6&#34;&gt;in&lt;/span&gt; the trait&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#ff79c6&#34;&gt;--&amp;gt;&lt;/span&gt; src&lt;span style=&#34;color:#ff79c6&#34;&gt;/&lt;/span&gt;main.rs:&lt;span style=&#34;color:#bd93f9&#34;&gt;10&lt;/span&gt;:&lt;span style=&#34;color:#bd93f9&#34;&gt;1&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   &lt;span style=&#34;color:#ff79c6&#34;&gt;|&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bd93f9&#34;&gt;5&lt;/span&gt;  &lt;span style=&#34;color:#ff79c6&#34;&gt;|&lt;/span&gt;     fn &lt;span style=&#34;color:#50fa7b&#34;&gt;method_name&lt;/span&gt;(&lt;span style=&#34;color:#ff79c6&#34;&gt;&amp;amp;&lt;/span&gt;self);&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   &lt;span style=&#34;color:#ff79c6&#34;&gt;|&lt;/span&gt;     &lt;span style=&#34;color:#ff79c6&#34;&gt;-----------------&lt;/span&gt;&lt;span style=&#34;color:#6272a4&#34;&gt;-- the trait has no `&amp;amp;self` declaration&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;...&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bd93f9&#34;&gt;10&lt;/span&gt; &lt;span style=&#34;color:#ff79c6&#34;&gt;|&lt;/span&gt;     fn &lt;span style=&#34;color:#50fa7b&#34;&gt;method_name&lt;/span&gt;(&lt;span style=&#34;color:#ff79c6&#34;&gt;&amp;amp;&lt;/span&gt;self) { ... }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   &lt;span style=&#34;color:#ff79c6&#34;&gt;|&lt;/span&gt;     &lt;span style=&#34;color:#ff79c6&#34;&gt;^^^^^^^^^^^^^^^^^^^^^&lt;/span&gt; the impl has a &lt;span style=&#34;color:#ff79c6&#34;&gt;`&amp;amp;&lt;/span&gt;self&lt;span style=&#34;color:#ff79c6&#34;&gt;`&lt;/span&gt; declaration&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Alternatively, you may encounter the inverse situation where the trait declares &lt;code&gt;&amp;amp;self&lt;/code&gt; but the implementation does not:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fix E0204: Method Return Type Mismatch in Rust Trait Implementation</title>
      <link>https://errorvault.dev/rust/rust-e0204-method-return-type-mismatch/</link>
      <pubDate>Wed, 15 Jul 2026 17:32:04 +0800</pubDate>
      <guid>https://errorvault.dev/rust/rust-e0204-method-return-type-mismatch/</guid>
      <description>&lt;h2 id=&#34;1-symptoms&#34;&gt;1. Symptoms&lt;/h2&gt;&#xA;&lt;p&gt;The Rust compiler produces error E0204 when attempting to compile code where a trait implementation provides a method with a return type that differs from what the trait declares. This error manifests during compilation and prevents the binary from being built.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Shell output showing the error:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-mysql&#34; data-lang=&#34;mysql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;error[E0204]: mismatched types&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#ff79c6&#34;&gt;--&amp;gt;&lt;/span&gt; src&lt;span style=&#34;color:#ff79c6&#34;&gt;/&lt;/span&gt;main.rs:&lt;span style=&#34;color:#bd93f9&#34;&gt;6&lt;/span&gt;:&lt;span style=&#34;color:#bd93f9&#34;&gt;5&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   &lt;span style=&#34;color:#ff79c6&#34;&gt;|&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bd93f9&#34;&gt;5&lt;/span&gt;  &lt;span style=&#34;color:#ff79c6&#34;&gt;|&lt;/span&gt;     fn &lt;span style=&#34;color:#50fa7b&#34;&gt;clone&lt;/span&gt;(&lt;span style=&#34;color:#ff79c6&#34;&gt;&amp;amp;&lt;/span&gt;self) &lt;span style=&#34;color:#ff79c6&#34;&gt;-&amp;gt;&lt;/span&gt; Self;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   &lt;span style=&#34;color:#ff79c6&#34;&gt;|&lt;/span&gt;                    &lt;span style=&#34;color:#ff79c6&#34;&gt;----&lt;/span&gt;&lt;span style=&#34;color:#6272a4&#34;&gt;-- expected `Self` because of return type&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bd93f9&#34;&gt;6&lt;/span&gt;  &lt;span style=&#34;color:#ff79c6&#34;&gt;|&lt;/span&gt;     fn &lt;span style=&#34;color:#50fa7b&#34;&gt;clone&lt;/span&gt;(&lt;span style=&#34;color:#ff79c6&#34;&gt;&amp;amp;&lt;/span&gt;self) &lt;span style=&#34;color:#ff79c6&#34;&gt;-&amp;gt;&lt;/span&gt; Box&lt;span style=&#34;color:#ff79c6&#34;&gt;&amp;lt;&lt;/span&gt;dyn Cloneable&lt;span style=&#34;color:#ff79c6&#34;&gt;&amp;gt;&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   &lt;span style=&#34;color:#ff79c6&#34;&gt;|&lt;/span&gt;     &lt;span style=&#34;color:#ff79c6&#34;&gt;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&lt;/span&gt; expected &lt;span style=&#34;color:#ff79c6&#34;&gt;`&lt;/span&gt;Self&lt;span style=&#34;color:#ff79c6&#34;&gt;`&lt;/span&gt;, found &lt;span style=&#34;color:#ff79c6&#34;&gt;`&lt;/span&gt;Box&lt;span style=&#34;color:#ff79c6&#34;&gt;&amp;lt;&lt;/span&gt;dyn Cloneable&lt;span style=&#34;color:#ff79c6&#34;&gt;&amp;gt;`&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   &lt;span style=&#34;color:#ff79c6&#34;&gt;|&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   &lt;span style=&#34;color:#ff79c6&#34;&gt;=&lt;/span&gt; note: expected type &lt;span style=&#34;color:#ff79c6&#34;&gt;`&lt;/span&gt;Self&lt;span style=&#34;color:#ff79c6&#34;&gt;`&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           found type &lt;span style=&#34;color:#ff79c6&#34;&gt;`&lt;/span&gt;Box&lt;span style=&#34;color:#ff79c6&#34;&gt;&amp;lt;&lt;/span&gt;dyn Cloneable&lt;span style=&#34;color:#ff79c6&#34;&gt;&amp;gt;`&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;A second manifestation of this error occurs with associated type constraints:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fix E0398: Rust Compiler Error E0398 Explained</title>
      <link>https://errorvault.dev/rust/rust-e0398-impl-items-override/</link>
      <pubDate>Mon, 06 Jul 2026 07:56:04 +0800</pubDate>
      <guid>https://errorvault.dev/rust/rust-e0398-impl-items-override/</guid>
      <description>&lt;h2 id=&#34;1-symptoms&#34;&gt;1. Symptoms&lt;/h2&gt;&#xA;&lt;p&gt;The Rust compiler emits error E0398 when you attempt to implement an item that does not override anything from a trait definition. This error typically manifests during compilation and prevents the code from building successfully.&lt;/p&gt;&#xA;&lt;p&gt;When you encounter E0398, you will see output similar to the following:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;error&lt;span style=&#34;color:#ff79c6&#34;&gt;[&lt;/span&gt;E0398&lt;span style=&#34;color:#ff79c6&#34;&gt;]&lt;/span&gt;: &lt;span style=&#34;color:#f1fa8c&#34;&gt;`&lt;/span&gt;impl_item&lt;span style=&#34;color:#f1fa8c&#34;&gt;`&lt;/span&gt; is not a method from the trait&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; --&amp;gt; src/main.rs:3:5&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  |&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bd93f9&#34;&gt;3&lt;/span&gt; |     fn impl_item&lt;span style=&#34;color:#ff79c6&#34;&gt;(&lt;/span&gt;&amp;amp;self&lt;span style=&#34;color:#ff79c6&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#ff79c6&#34;&gt;{&lt;/span&gt; &lt;span style=&#34;color:#ff79c6&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  |     ^^^^^^^^^^^^^^^^^^&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  |&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#ff79c6&#34;&gt;=&lt;/span&gt; note: this error &lt;span style=&#34;color:#ff79c6&#34;&gt;function&lt;/span&gt;&lt;span style=&#34;color:#f1fa8c&#34;&gt;&amp;#39;s name doesn&amp;#39;&lt;/span&gt;t follow the naming convention of its trait&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The error message indicates that the compiler has found an &lt;code&gt;impl&lt;/code&gt; block containing a method or associated item that does not correspond to any item defined in the target trait. This situation commonly arises when you rename a method in your trait definition but forget to update the corresponding implementation, or when you accidentally add an extra method to an impl block that should only contain trait implementations.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fix E0050: Method Has an Incompatible Type for Trait</title>
      <link>https://errorvault.dev/rust/rust-e0050-method-incompatible-trait/</link>
      <pubDate>Mon, 15 Jun 2026 17:32:04 +0800</pubDate>
      <guid>https://errorvault.dev/rust/rust-e0050-method-incompatible-trait/</guid>
      <description>&lt;h1 id=&#34;fix-e0050-method-has-an-incompatible-type-for-trait&#34;&gt;Fix E0050: Method Has an Incompatible Type for Trait&lt;/h1&gt;&#xA;&lt;p&gt;Error E0050 is a Rust compiler error that occurs when implementing a trait method where the method signature in the implementation does not match the signature declared in the trait definition. The Rust compiler performs strict type checking on trait implementations, and any deviation between the declared method signature and the actual implementation results in this error.&lt;/p&gt;&#xA;&lt;h2 id=&#34;1-symptoms&#34;&gt;1. Symptoms&lt;/h2&gt;&#xA;&lt;h2 id=&#34;when-error-e0050-is-triggered-youll-see-output-similar-to&#34;&gt;When error E0050 is triggered, you&amp;rsquo;ll see output similar to:&lt;/h2&gt;&#xA;&lt;p&gt;error[E0050]: method &lt;code&gt;method_name&lt;/code&gt; has an incompatible type for trait &lt;code&gt;TraitName&lt;/code&gt;&#xA;&amp;ndash;&amp;gt; src/main.rs:5:1&#xA;|&#xA;5 | impl TraitName for StructName {&#xA;| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method &lt;code&gt;method_name&lt;/code&gt; has an incompatible type for trait &lt;code&gt;TraitName&lt;/code&gt;&#xA;|&#xA;note: expected signature &lt;code&gt;fn(self) -&amp;gt; ReturnType&lt;/code&gt;&#xA;found signature &lt;code&gt;fn(self) -&amp;gt; DifferentReturnType&lt;/code&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
