diff options
Diffstat (limited to 'src/tools/rust-analyzer/crates/tt')
-rw-r--r-- | src/tools/rust-analyzer/crates/tt/Cargo.toml | 2 | ||||
-rw-r--r-- | src/tools/rust-analyzer/crates/tt/src/lib.rs | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/tools/rust-analyzer/crates/tt/Cargo.toml b/src/tools/rust-analyzer/crates/tt/Cargo.toml index b84693831..a28ee5f1c 100644 --- a/src/tools/rust-analyzer/crates/tt/Cargo.toml +++ b/src/tools/rust-analyzer/crates/tt/Cargo.toml @@ -12,6 +12,6 @@ rust-version.workspace = true doctest = false [dependencies] -smol_str = "0.1.23" +smol_str.workspace = true stdx.workspace = true diff --git a/src/tools/rust-analyzer/crates/tt/src/lib.rs b/src/tools/rust-analyzer/crates/tt/src/lib.rs index b7dbc82e1..c2ebf0374 100644 --- a/src/tools/rust-analyzer/crates/tt/src/lib.rs +++ b/src/tools/rust-analyzer/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>, |