<p dir="auto">It's wanted for <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="13712724" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/6085" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/6085/hovercard" href="https://github.com/rust-lang/rust/issues/6085">#6085</a>, and generally OR-ing flags together is a common pattern for which we don't otherwise have a typesafe solution. Does EnumSet meet the high bar for inclusion in std? If so, then it's API probably needs careful consideration.</p>
<p dir="auto">I don't have a repro for this, but it's a really annoying error because it seems to be a lie and it's not at all clear how users can fix it. I had a library depending on three other libraries. The external libraries were copied into a local project/bin directory so that I had more control over them.</p>
<p dir="auto">This was all working fine until I decided to rename my project. As part of this process I removed my bin directory and copied new versions of the external libraries into bin. Now when I do <code class="notranslate">rustc --out-dir bin -L bin -O src/rwebserve.rc</code> I get:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="src/rwebserve.rc:11:0: 11:42 error: duplicate definition of module socket
src/rwebserve.rc:11 use socket (name = &quot;socket&quot;, vers = &quot;0.1&quot;);"><pre class="notranslate"><code class="notranslate">src/rwebserve.rc:11:0: 11:42 error: duplicate definition of module socket
src/rwebserve.rc:11 use socket (name = "socket", vers = "0.1");
</code></pre></div>
<p dir="auto">If I change the use statement to "use socketXXX" I get the same error which makes me think that it is not a duplicate definition (and I don't see how it would be). My guess is that this is caused when using libraries built by slightly different versions of rustc. Unfortunately I now get an ICE trying to build one of the libraries so I can't try it out atm (currently building a new rustc in the hopes that that will fix the ICE).</p>