diff options
| author | Arthur Carcano <arthur.carcano@ocamlpro.com> | 2023-12-15 15:01:49 +0100 |
|---|---|---|
| committer | Arthur Carcano <arthur.carcano@ocamlpro.com> | 2023-12-15 15:01:49 +0100 |
| commit | 8142e8555a1ed10dad997a2c2b71e9ad73ea1bde (patch) | |
| tree | f3a66ae700b7586023d32aeee4f8d8815977a022 | |
| parent | 96df4943409564a187894018f15f795426dc2e1f (diff) | |
| download | rust-8142e8555a1ed10dad997a2c2b71e9ad73ea1bde.tar.gz rust-8142e8555a1ed10dad997a2c2b71e9ad73ea1bde.zip | |
Remove an unneeded allocation
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs index 9073cd6ac47..1eaee72455e 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs @@ -4665,7 +4665,7 @@ pub trait NextTypeParamName { impl NextTypeParamName for &[hir::GenericParam<'_>] { fn next_type_param_name(&self, name: Option<&str>) -> String { // This is the list of possible parameter names that we might suggest. - let name = name.and_then(|n| n.chars().next()).map(|c| c.to_string().to_uppercase()); + let name = name.and_then(|n| n.chars().next()).map(|c| c.to_uppercase().to_string()); let name = name.as_deref(); let possible_names = [name.unwrap_or("T"), "T", "U", "V", "X", "Y", "Z", "A", "B", "C"]; let used_names = self |
