Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/tt/src/lib.rs')
| -rw-r--r-- | crates/tt/src/lib.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/tt/src/lib.rs b/crates/tt/src/lib.rs index b7dbc82e1d..c2ebf03746 100644 --- a/crates/tt/src/lib.rs +++ b/crates/tt/src/lib.rs @@ -153,6 +153,12 @@ pub struct Ident<Span> { pub span: Span, } +impl<S> Ident<S> { + pub fn new(text: impl Into<SmolStr>, span: S) -> Self { + Ident { text: text.into(), span } + } +} + fn print_debug_subtree<Span: fmt::Debug>( f: &mut fmt::Formatter<'_>, subtree: &Subtree<Span>, |