<p dir="auto">Both type and value parameters. This compiles just fine, short of the unused-variable warnings:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn f&lt;T, T&gt;(t: T, t: T) {}"><pre class="notranslate"><span class="pl-k">fn</span> <span class="pl-en">f</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">,</span> <span class="pl-smi">T</span><span class="pl-kos">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">t</span><span class="pl-kos">:</span> <span class="pl-smi">T</span><span class="pl-kos">,</span> <span class="pl-s1">t</span><span class="pl-kos">:</span> <span class="pl-smi">T</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div>
<p dir="auto">That seems like a fairly useless feature, I imagine people would only ever do this by accident and then get fairly confused about why the "wrong" parameter is being used, if they somehow don't run into type errors. So I am posting this here in the hope it is a bug and not something that needs an RFC to be fixed.</p>
<p dir="auto">This is half a duplicate of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="38698708" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/15969" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/15969/hovercard" href="https://github.com/rust-lang/rust/issues/15969">#15969</a> but not a duplicate of the issue that is a duplicate of, imo.</p>
<p dir="auto">Currently the <code class="notranslate">crate-file-name</code> flag to the compiler can return more than one name if a build is made against a different crate type than the library defines.  For instance if the crate type is set to <code class="notranslate">lib</code> it will generate an rlib, even if <code class="notranslate">--crate-type=dylib</code> is defined.  This obviously is not a fault of the <code class="notranslate">--crate-file-name</code> parameter but the compiler itself in that it does not override the default crate type but append it to the list of things to build.</p>
<p dir="auto">The reason this is frustrating is because <code class="notranslate">--crate-file-name</code> is very useful for building makefiles but it becomes much more complicated to manage if a target can produce more than one output file.</p>