diff --git a/src/cargo/util/toml/mod.rs b/src/cargo/util/toml/mod.rs index 42851b9d4b6..7c472bf8b2f 100644 --- a/src/cargo/util/toml/mod.rs +++ b/src/cargo/util/toml/mod.rs @@ -566,7 +566,7 @@ impl TomlProfile { if let Some(codegen_backend) = &self.codegen_backend { features.require(Feature::codegen_backend())?; - if codegen_backend.contains(|c| !c.is_ascii_alphanumeric() && c != '_') { + if codegen_backend.contains(|c: char| !c.is_ascii_alphanumeric() && c != '_') { bail!( "`profile.{}.codegen-backend` setting of `{}` is not a valid backend name.", name,