title: Why "Run cargo install ..." fails with "error: edition 2021 is unstable" though 'edition 2018' was specified?
body: <p>Though this was working last week, suddenly now while building docker image for my rust application the following command fails-</p>
  <pre><code>RUN cargo install --target x86_64-unknown-linux-musl --path .
  </code></pre>
  <p>with errors-</p>
  <p>Compiling ed25519 v1.4.0
  error: edition 2021 is unstable and only available with -Z unstable-options.</p>
  <p>error: failed to compile <code>config-client v0.1.0 (/home/rust/src)</code>, intermediate artifacts can be found at <code>/home/rust/src/target</code></p>
  <p>Caused by:
  could not compile <code>ed25519</code></p>
  <p>Following is my Cargo.toml file:</p>
  <pre><code>[package]
  name = &quot;application-xyz&quot;
  version = &quot;0.1.0&quot;
  authors = [&quot;Dev Team &lt;dev@abc.com&gt;&quot;]
  edition = &quot;2018&quot;
  
  [dependencies]
  anyhow = &quot;1.0&quot;
  bytes = &quot;1.0.1&quot;
  clap = &quot;2.33.3&quot;
  log = &quot;0.4.14&quot;
  log4rs = &quot;1.0.0&quot;
  mustache = &quot;0.9.0&quot;
  nats = &quot;0.9.7&quot;
  prost = &quot;0.7&quot;
  prost-types = &quot;0.7&quot;
  reqwest = { version = &quot;0.11.3&quot;, features = [&quot;blocking&quot;, &quot;json&quot;] }
  serde = { version = &quot;1.0.125&quot;, features = [&quot;derive&quot;] }
  
  [build-dependencies]
  prost-build = &quot;0.7&quot;
  </code></pre>
  <p>My docker file is:</p>
  <pre><code>FROM containers.abc.com/rust-musl-builder:1.51 as builder
  
  #Add protobuf sources as well as app source code.
  COPY model/src ./model/src
  COPY application-xyz:/build.rs ./build.rs
  COPY application-xyz:/Cargo.toml ./Cargo.toml
  COPY application-xyz:/src ./src
  COPY application-xyz:/src/protobuf ./src/protobuf
  
  RUN cargo install --target x86_64-unknown-linux-musl --path .
  </code></pre>
  <p>Any fix for this? Why cargo tries to download from 'edition 2021' though 'edition 2018' was specified? And why it downloads almost all the libraries though it has not been specified anywhere?</p>