about summary refs log tree commit diff
path: root/compiler/rustc_borrowck/src
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2025-01-07 14:12:07 +0200
committerJosh Triplett <josh@joshtriplett.org>2025-01-07 14:30:02 +0200
commitbb6bbfa13f97e6ef30ecd63c835c99cf7762bd6e (patch)
tree72903e70f117fddc546a875d4fff4285c11c00d1 /compiler/rustc_borrowck/src
parentfb546ee09b226bc4dd4b712d35a372d923c4fa54 (diff)
downloadrust-bb6bbfa13f97e6ef30ecd63c835c99cf7762bd6e.tar.gz
rust-bb6bbfa13f97e6ef30ecd63c835c99cf7762bd6e.zip
Avoid naming variables `str`
This renames variables named `str` to other names, to make sure `str`
always refers to a type.

It's confusing to read code where `str` (or another standard type name)
is used as an identifier. It also produces misleading syntax
highlighting.
Diffstat (limited to 'compiler/rustc_borrowck/src')
-rw-r--r--compiler/rustc_borrowck/src/region_infer/values.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_borrowck/src/region_infer/values.rs b/compiler/rustc_borrowck/src/region_infer/values.rs
index e567f3a8b0d..75aef8b303b 100644
--- a/compiler/rustc_borrowck/src/region_infer/values.rs
+++ b/compiler/rustc_borrowck/src/region_infer/values.rs
@@ -544,12 +544,12 @@ fn pretty_print_region_elements(elements: impl IntoIterator<Item = RegionElement
 
     return result;
 
-    fn push_location_range(str: &mut String, location1: Location, location2: Location) {
+    fn push_location_range(s: &mut String, location1: Location, location2: Location) {
         if location1 == location2 {
-            str.push_str(&format!("{location1:?}"));
+            s.push_str(&format!("{location1:?}"));
         } else {
             assert_eq!(location1.block, location2.block);
-            str.push_str(&format!(
+            s.push_str(&format!(
                 "{:?}[{}..={}]",
                 location1.block, location1.statement_index, location2.statement_index
             ));