]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/miri/src/stacked_borrows/diagnostics.rs
bless clippy
[rust.git] / src / tools / miri / src / stacked_borrows / diagnostics.rs
index 2cc7a88704ea39497adb6ef9811cf0419f14e28e..d3843b030347fe69cbc0f685411171df4b3dbf2a 100644 (file)
@@ -86,12 +86,12 @@ fn generate_diagnostic(&self) -> (String, SpanData) {
 impl fmt::Display for InvalidationCause {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         match self {
-            InvalidationCause::Access(kind) => write!(f, "{}", kind),
+            InvalidationCause::Access(kind) => write!(f, "{kind}"),
             InvalidationCause::Retag(perm, kind) =>
                 if *kind == RetagCause::FnEntry {
-                    write!(f, "{:?} FnEntry retag", perm)
+                    write!(f, "{perm:?} FnEntry retag")
                 } else {
-                    write!(f, "{:?} retag", perm)
+                    write!(f, "{perm:?} retag")
                 },
         }
     }
@@ -339,7 +339,7 @@ pub fn get_logs_relevant_to(
                 // this allocation.
                 if self.history.base.0.tag() == tag {
                     Some((
-                        format!("{:?} was created here, as the base tag for {:?}", tag, self.history.id),
+                        format!("{tag:?} was created here, as the base tag for {:?}", self.history.id),
                         self.history.base.1.data()
                     ))
                 } else {
@@ -381,7 +381,7 @@ pub fn grant_error(&self, perm: Permission, stack: &Stack) -> InterpError<'tcx>
             self.offset.bytes(),
         );
         err_sb_ub(
-            format!("{}{}", action, error_cause(stack, op.orig_tag)),
+            format!("{action}{}", error_cause(stack, op.orig_tag)),
             Some(operation_summary(&op.cause.summary(), self.history.id, op.range)),
             op.orig_tag.and_then(|orig_tag| self.get_logs_relevant_to(orig_tag, None)),
         )
@@ -401,7 +401,7 @@ pub fn access_error(&self, stack: &Stack) -> InterpError<'tcx> {
             offset = self.offset.bytes(),
         );
         err_sb_ub(
-            format!("{}{}", action, error_cause(stack, op.tag)),
+            format!("{action}{}", error_cause(stack, op.tag)),
             Some(operation_summary("an access", self.history.id, op.range)),
             op.tag.and_then(|tag| self.get_logs_relevant_to(tag, None)),
         )