about summary refs log tree commit diff
path: root/compiler/rustc_span/src/source_map.rs
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-06-28 15:18:07 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-09-01 14:54:27 +0000
commit1fc9ef1edd30ae5a924c3673d76f275f7d12c3fb (patch)
treebfcd5b96fdb596e08a0b0b187163a65287dfe777 /compiler/rustc_span/src/source_map.rs
parentee3c8350189de045ec71997874eaa6cebf99fbf3 (diff)
downloadrust-1fc9ef1edd30ae5a924c3673d76f275f7d12c3fb.tar.gz
rust-1fc9ef1edd30ae5a924c3673d76f275f7d12c3fb.zip
tracing::instrument cleanup
Diffstat (limited to 'compiler/rustc_span/src/source_map.rs')
-rw-r--r--compiler/rustc_span/src/source_map.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_span/src/source_map.rs b/compiler/rustc_span/src/source_map.rs
index 8ffbbff7a7d..4d94c92d3f2 100644
--- a/compiler/rustc_span/src/source_map.rs
+++ b/compiler/rustc_span/src/source_map.rs
@@ -1059,13 +1059,13 @@ impl FilePathMapping {
 
         return remap_path_prefix(&self.mapping, path);
 
-        #[instrument(level = "debug", skip(mapping))]
+        #[instrument(level = "debug", skip(mapping), ret)]
         fn remap_path_prefix(mapping: &[(PathBuf, PathBuf)], path: PathBuf) -> (PathBuf, bool) {
             // NOTE: We are iterating over the mapping entries from last to first
             //       because entries specified later on the command line should
             //       take precedence.
             for &(ref from, ref to) in mapping.iter().rev() {
-                debug!("Trying to apply {:?} => {:?}", from, to);
+                debug!("Trying to apply {from:?} => {to:?}");
 
                 if let Ok(rest) = path.strip_prefix(from) {
                     let remapped = if rest.as_os_str().is_empty() {
@@ -1079,15 +1079,15 @@ impl FilePathMapping {
                     } else {
                         to.join(rest)
                     };
-                    debug!("Match - remapped {:?} => {:?}", path, remapped);
+                    debug!("Match - remapped");
 
                     return (remapped, true);
                 } else {
-                    debug!("No match - prefix {:?} does not match {:?}", from, path);
+                    debug!("No match - prefix {from:?} does not match");
                 }
             }
 
-            debug!("Path {:?} was not remapped", path);
+            debug!("not remapped");
             (path, false)
         }
     }