title: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
body: <p>I'm trying to build rust with libc(from my local machine) where I made some changes. But I'm facing this issue. Please help</p>
  
  <pre><code>  error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
  
  Caused by:
    patch for `libc` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
  Traceback (most recent call last):
    File "./x.py", line 11, in &lt;module&gt;
      bootstrap.main()
    File "/local/mnt/workspace/mahto/rust/src/bootstrap/bootstrap.py", line 960, in main
      bootstrap(help_triggered)
    File "/local/mnt/workspace/mahto/rust/src/bootstrap/bootstrap.py", line 929, in bootstrap
      build.build_bootstrap()
    File "/local/mnt/workspace/mahto/rust/src/bootstrap/bootstrap.py", line 724, in build_bootstrap
      run(args, env=env, verbose=self.verbose)
    File "/local/mnt/workspace/mahto/rust/src/bootstrap/bootstrap.py", line 143, in run
      raise RuntimeError(err)
  RuntimeError: failed to run: /local/mnt/workspace/mahto/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /local/mnt/workspace/mahto/rust/src/bootstrap/Cargo.toml --verbose
  </code></pre>
  
  <p>This is my <code>Cargo.toml</code>:</p>
  
  <pre><code>[patch."https://github.com/rust-lang/cargo"]
  cargo = { path = "src/tools/cargo" }
  
  [patch.crates-io]
  # Similar to Cargo above we want the RLS to use a vendored version of `rustfmt`
  # that we're shipping as well (to ensure that the rustfmt in RLS and the
  # `rustfmt` executable are the same exact version).
  rustfmt-nightly = { path = "src/tools/rustfmt" }
  
  # See comments in `src/tools/rustc-workspace-hack/README.md` for what's going on
  # here
  rustc-workspace-hack = { path = 'src/tools/rustc-workspace-hack' }
  
  # See comments in `tools/rustc-std-workspace-core/README.md` for what's going on
  # here
  rustc-std-workspace-core = { path = 'src/tools/rustc-std-workspace-core' }
  rustc-std-workspace-alloc = { path = 'src/tools/rustc-std-workspace-alloc' }
  rustc-std-workspace-std = { path = 'src/tools/rustc-std-workspace-std' }
  libc = { path = '../libc'}
  </code></pre>
  
  <p>this is my <code>cargo.lock</code>:</p>
  
  <pre><code>[[package]]
  name = "libc"
  version = "0.2.70"
  source = "registry+https://github.com/rust-lang/crates.io-index"
  checksum = "3baa92041a6fec78c687fa0cc2b3fae8884f743d672cf551bed1d6dac6988d0f"
  dependencies = [
   "rustc-std-workspace-core",
  ]
  </code></pre>
  
  <p>my libc version is v0.2.70, and libc directory is just outside the rust directory and (<code>path = "../libc"</code>)</p>