Update error message

Co-authored-by: Josh Triplett <josh@joshtriplett.org>
This commit is contained in:
bjorn3 2021-08-05 17:15:22 +02:00 committed by GitHub
parent 2d73a9d544
commit cd642e1893
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -566,10 +566,11 @@ impl TomlProfile {
if let Some(codegen_backend) = &self.codegen_backend {
features.require(Feature::codegen_backend())?;
if codegen_backend.contains('.') {
if codegen_backend.contains(|c| !c.is_ascii_alphanumeric() && c != '_') {
bail!(
"`profile.{}.codegen-backend` is an external backend, but only builtin codegen \
backends are allowed."
"`profile.{}.codegen-backend` setting of `{}` is not a valid backend name.",
name,
codegen_backend,
);
}
}