Support `cargo install --path ...` using `rust-toolchain`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 22h 40m
- Merged PRs (30d)
- 46
Description
Problem
If a crate contains a rust-toolchain file, the default toolchain is used if cargo install --path ... is run from outside of the crate's directory. I expected it to use the toolchain specified in rust-toolchain.
Steps
rustup default stablecargo new fooecho nightly >foo/rust-toolchainsed -i '1i#![feature(exact_size_is_empty)]' foo/src/main.rscargo install --path foo
cd foo && cargo install --path . does work.
Notes
Output of rustup --version: rustup 1.21.1 (7832b2ebe 2019-12-20)
Output of rustup show:
Default host: x86_64-pc-windows-msvc
rustup home: C:\Users\mkraai\.rustup
installed toolchains
--------------------
stable-x86_64-pc-windows-msvc
nightly-x86_64-pc-windows-msvc
active toolchain
----------------
stable-x86_64-pc-windows-msvc (default)
rustc 1.40.0 (73528e339 2019-12-16)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the listed rustup and cargo install steps, comparing cargo install --path foo with cd foo && cargo install --path .. Trace how the toolchain is selected for an external path; done means the command uses the crate's rust-toolchain and regression coverage preserves the working in-directory case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100