diff --git a/crates/syntest/src/syntest.rs b/crates/syntest/src/syntest.rs index 2dc198a..58b8e15 100644 --- a/crates/syntest/src/syntest.rs +++ b/crates/syntest/src/syntest.rs @@ -1,3 +1,4 @@ +use std::fmt::Display; use std::fs; use std::path::PathBuf; use syn::{ @@ -443,6 +444,12 @@ impl LocalVariable { } } +impl Display for LocalVariable { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.name()) + } +} + #[cfg(test)] mod tests { use super::*;