<p dir="auto">After closing <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="27712142" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/12344" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/12344/hovercard" href="https://github.com/rust-lang/rust/issues/12344">#12344</a>, we should think about the best strategy for replacing usage of managed boxes inside <code class="notranslate">List&lt;T&gt;</code>. <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/alexcrichton/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/alexcrichton">@alexcrichton</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bill-myers/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bill-myers">@bill-myers</a> and <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/eddyb/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/eddyb">@eddyb</a> provided good hints on how we should implement <code class="notranslate">List&lt;T&gt;</code> internally (i.e. instead of using an enum, use a struct-based approach with 'head' and 'tail').</p>
<p dir="auto">I am writing a Euclidean Vector class, and want to override some operations for it. However, when I try to add mul for both Vector-Vector multiplication and Vector-Scalar multiplication, the compiler complains that there is a <code class="notranslate">Duplicate supertrait in trait declaration</code>:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="euclidean_vector.rs:5:0: 20:1 error: Duplicate supertrait in trait declaration
euclidean_vector.rs:5 pub trait EuclideanVector&lt;T: Num + Algebraic&gt; : 
euclidean_vector.rs:6   Add&lt;Self, Self&gt; +
euclidean_vector.rs:7   Sub&lt;Self, Self&gt; +
euclidean_vector.rs:8   Mul&lt;Self, Self&gt; +
euclidean_vector.rs:9   Mul&lt;T, Self&gt; +
euclidean_vector.rs:10   One + Zero +"><pre class="notranslate">euclidean_vector<span class="pl-kos">.</span><span class="pl-c1">rs</span><span class="pl-kos">:</span><span class="pl-c1">5</span><span class="pl-kos">:</span><span class="pl-c1">0</span><span class="pl-kos">:</span> <span class="pl-c1">20</span><span class="pl-kos">:</span><span class="pl-c1">1</span> error<span class="pl-kos">:</span> <span class="pl-v">Duplicate</span> supertrait <span class="pl-k">in</span> <span class="pl-k">trait</span> declaration
euclidean_vector<span class="pl-kos">.</span>rs<span class="pl-kos">:</span><span class="pl-c1">5</span> <span class="pl-k">pub</span> <span class="pl-k">trait</span> <span class="pl-v">EuclideanVector</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">:</span> <span class="pl-smi">Num</span> + <span class="pl-smi">Algebraic</span><span class="pl-kos">&gt;</span> <span class="pl-kos">:</span> 
<span class="pl-smi">euclidean_vector</span><span class="pl-kos">.</span>rs<span class="pl-kos">:</span><span class="pl-c1">6</span>   <span class="pl-v">Add</span>&lt;<span class="pl-v">Self</span><span class="pl-kos">,</span> <span class="pl-v">Self</span>&gt; +
euclidean_vector<span class="pl-kos">.</span><span class="pl-c1">rs</span><span class="pl-kos">:</span><span class="pl-c1">7</span>   <span class="pl-v">Sub</span>&lt;<span class="pl-v">Self</span><span class="pl-kos">,</span> <span class="pl-v">Self</span>&gt; +
euclidean_vector<span class="pl-kos">.</span><span class="pl-c1">rs</span><span class="pl-kos">:</span><span class="pl-c1">8</span>   <span class="pl-v">Mul</span>&lt;<span class="pl-v">Self</span><span class="pl-kos">,</span> <span class="pl-v">Self</span>&gt; +
euclidean_vector<span class="pl-kos">.</span><span class="pl-c1">rs</span><span class="pl-kos">:</span><span class="pl-c1">9</span>   <span class="pl-v">Mul</span>&lt;<span class="pl-v">T</span><span class="pl-kos">,</span> <span class="pl-v">Self</span>&gt; +
euclidean_vector<span class="pl-kos">.</span><span class="pl-c1">rs</span><span class="pl-kos">:</span><span class="pl-c1">10</span>   <span class="pl-v">One</span> + <span class="pl-v">Zero</span> +</pre></div>