<p dir="auto">The switch to the new installers seems to result in <code class="notranslate">rustup.sh</code> deleting the rustc. It downloads and installs rustc fine, then downloads cargo, but the installer for that first deletes rustc as legacy, and then installs cargo, meaning cargo works fine... but there's no compiler.</p>
<p dir="auto">Snippet of output at the end of installing rustc/beginning of installing cargo.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="...
install: installing /usr/local/share/man/man1/rustc.1
install: installing /usr/local/share/man/man1/rustdoc.1
install: 
install: verifying installed binaries are executable

    Rust is ready to roll.

rustup: Extracting cargo-nightly-x86_64-unknown-linux-gnu.tar.gz
install: looking for install programs
install: 
install: found mkdir
install: found printf
install: found cut
install: found grep
install: found uname
install: found tr
install: found sed
install: 
install: processing ./rustup-tmp-install/cargo-nightly-x86_64-unknown-linux-gnu/install.sh args
install: 
install: CFG_DESTDIR          :=  
install: CFG_PREFIX           := /usr/local 
install: CFG_LIBDIR           := /usr/local/lib 
install: CFG_MANDIR           := /usr/local/share/man 
install: 
install: validating ./rustup-tmp-install/cargo-nightly-x86_64-unknown-linux-gnu/install.sh args
install: 
install: verifying platform can run binaries
install: verifying destination is writable
install: verifying destination is not the same as source
install: removing legacy file /usr/local/bin/rust-lldb
install: removing legacy file /usr/local/bin/rustc
install: removing legacy file /usr/local/bin/rustdoc
install: removing legacy file /usr/local/lib/libarena-4e7c5e5c.so
install: removing legacy file /usr/local/lib/libflate-4e7c5e5c.so
install: removing legacy file /usr/local/lib/libfmt_macros-4e7c5e5c.so
..."><pre class="notranslate"><code class="notranslate">...
install: installing /usr/local/share/man/man1/rustc.1
install: installing /usr/local/share/man/man1/rustdoc.1
install: 
install: verifying installed binaries are executable

    Rust is ready to roll.

rustup: Extracting cargo-nightly-x86_64-unknown-linux-gnu.tar.gz
install: looking for install programs
install: 
install: found mkdir
install: found printf
install: found cut
install: found grep
install: found uname
install: found tr
install: found sed
install: 
install: processing ./rustup-tmp-install/cargo-nightly-x86_64-unknown-linux-gnu/install.sh args
install: 
install: CFG_DESTDIR          :=  
install: CFG_PREFIX           := /usr/local 
install: CFG_LIBDIR           := /usr/local/lib 
install: CFG_MANDIR           := /usr/local/share/man 
install: 
install: validating ./rustup-tmp-install/cargo-nightly-x86_64-unknown-linux-gnu/install.sh args
install: 
install: verifying platform can run binaries
install: verifying destination is writable
install: verifying destination is not the same as source
install: removing legacy file /usr/local/bin/rust-lldb
install: removing legacy file /usr/local/bin/rustc
install: removing legacy file /usr/local/bin/rustdoc
install: removing legacy file /usr/local/lib/libarena-4e7c5e5c.so
install: removing legacy file /usr/local/lib/libflate-4e7c5e5c.so
install: removing legacy file /usr/local/lib/libfmt_macros-4e7c5e5c.so
...
</code></pre></div>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/brson/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/brson">@brson</a></p>
<p dir="auto">Spawned off of a note from PR <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="58199219" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/22532" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/22532/hovercard" href="https://github.com/rust-lang/rust/pull/22532">#22532</a> on commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/1246d4067fdc034d064dfb78f88c2c3c079c3f4f/hovercard" href="https://github.com/rust-lang/rust/commit/1246d4067fdc034d064dfb78f88c2c3c079c3f4f"><tt>1246d40</tt></a></p>
<p dir="auto">The following program:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#[repr(usize)]
enum Foo {
    A = 0xffffffffffffffff_usize,
    B,
    C
}

fn main() {
    println!(&quot;Hello World: {:x}&quot;, Foo::A as usize);
    println!(&quot;Hello World: {:x}&quot;, Foo::B as usize);
    println!(&quot;Hello World: {:x}&quot;, Foo::C as usize);
}"><pre class="notranslate"><span class="pl-c1">#<span class="pl-kos">[</span>repr<span class="pl-kos">(</span>usize<span class="pl-kos">)</span><span class="pl-kos">]</span></span>
<span class="pl-k">enum</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span>
    <span class="pl-v">A</span> = <span class="pl-c1">0xffffffffffffffff_usize</span><span class="pl-kos">,</span>
    <span class="pl-v">B</span><span class="pl-kos">,</span>
    <span class="pl-v">C</span>
<span class="pl-kos">}</span>

<span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"Hello World: {:x}"</span>, <span class="pl-v">Foo</span>::<span class="pl-v">A</span> <span class="pl-k">as</span> <span class="pl-smi">usize</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"Hello World: {:x}"</span>, <span class="pl-v">Foo</span>::<span class="pl-v">B</span> <span class="pl-k">as</span> <span class="pl-smi">usize</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"Hello World: {:x}"</span>, <span class="pl-v">Foo</span>::<span class="pl-v">C</span> <span class="pl-k">as</span> <span class="pl-smi">usize</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">compiles and prints:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Hello World: ffffffffffffffff
Hello World: 0
Hello World: 1"><pre class="notranslate"><code class="notranslate">Hello World: ffffffffffffffff
Hello World: 0
Hello World: 1
</code></pre></div>
<p dir="auto">My personal preference would be for a compiler error due to the implicit overflow, with a note saying that the programmer should explicitly assign some value to <code class="notranslate">Foo::B</code>. (And thus they can opt into the current behavior by assigning it <code class="notranslate">B = 0,</code>; then <code class="notranslate">Foo::C</code> would continue to be assigned 1 as today.)</p>