Skip to content

Commit 0c3d6eb

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 0c3d6eb

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

Diff for: src/config.rs

+1-12
Original file line numberDiff line numberDiff line change
@@ -181,18 +181,7 @@ impl OverrideCfg {
181181
.transpose()?,
182182
}
183183
}
184-
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-
}
194-
Self::Custom(name)
195-
}
184+
ToolchainName::Custom(name) => Self::Custom(name),
196185
})
197186
}
198187

0 commit comments

Comments
 (0)