Skip to content

Commit 1b80189

Browse files
committed
Remove validation for custom toolchains when reading rust-toolchain.toml
This validation was introduced in e1306b3 However, it breaks a number of scenarios that previously worked without issue such as #4248. As requested by rustup maintainers in that thread, I'm taking out the extra validation added in that commit, leaving the rest of the code as-is. I was not able to figure out a way to write an automated test for this scenario since the rustup CLI needs the custom toolchain to actually exist and unit testing looked infeasible due to use of the `Cfg` type. Manual testing confirms this fixes #4248.
1 parent 7588311 commit 1b80189

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

Diff for: src/config.rs

-9
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,6 @@ impl OverrideCfg {
182182
}
183183
}
184184
ToolchainName::Custom(name) => {
185-
if file.toolchain.targets.is_some()
186-
|| file.toolchain.components.is_some()
187-
|| file.toolchain.profile.is_some()
188-
{
189-
bail!(
190-
"toolchain options are ignored for a custom toolchain ({})",
191-
name
192-
)
193-
}
194185
Self::Custom(name)
195186
}
196187
})

0 commit comments

Comments
 (0)