rustup
                                
                                 rustup copied to clipboard
                                
                                    rustup copied to clipboard
                            
                            
                            
                        `rust-toolchain.toml`: support multiple channels, or rather support nightly AND stable version.
Problem
My team prefers cargo +nightly fmt for formatting over stable.
I have a different nightly installed locally than we have in CI, causing CI checks to fail. A solution would be to use rust-tooolchain.toml, alas we only want to use nightly for fmt.
Today rust-tooolchain.toml does not support this, but I would like it to be supported.
What do you think?
Proposed Solution
Bikeshedding syntax/overall idea:
[toolchain]
nightly = "2024-12-14"
stable = "1.87.0"
And then when I run cargo +nightly the "2024-12-14" version will be used. But for non-nightly commands "1.87.0" is used.
Notes
We can also omit either or, i.e. both:
[toolchain]
nightly = "2024-12-14"
and
[toolchain]
stable = "1.87.0"
are valid.