Skip to content

Commit cd642e1

Browse files
bjorn3joshtriplett
andauthored
Update error message
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
1 parent 2d73a9d commit cd642e1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/cargo/util/toml/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -566,10 +566,11 @@ impl TomlProfile {
566566

567567
if let Some(codegen_backend) = &self.codegen_backend {
568568
features.require(Feature::codegen_backend())?;
569-
if codegen_backend.contains('.') {
569+
if codegen_backend.contains(|c| !c.is_ascii_alphanumeric() && c != '_') {
570570
bail!(
571-
"`profile.{}.codegen-backend` is an external backend, but only builtin codegen \
572-
backends are allowed."
571+
"`profile.{}.codegen-backend` setting of `{}` is not a valid backend name.",
572+
name,
573+
codegen_backend,
573574
);
574575
}
575576
}

0 commit comments

Comments
 (0)