diff options
| author | Laurențiu Nicola <lnicola@dend.ro> | 2023-06-05 12:04:23 +0300 |
|---|---|---|
| committer | Laurențiu Nicola <lnicola@dend.ro> | 2023-06-05 12:04:23 +0300 |
| commit | b8a7d439db0cfd765ed4bfedd2bbaeeee58b05a5 (patch) | |
| tree | 5adcbc6cf50af3bebc2cd4f42d5252a4d728690e /src/tools/rust-analyzer/crates/tt | |
| parent | 51f714c8c5021fe25442e46798b1cbef2f2249ed (diff) | |
| parent | aa9bc8612514d216f84eec218dfd19ab83f3598a (diff) | |
| download | rust-b8a7d439db0cfd765ed4bfedd2bbaeeee58b05a5.tar.gz rust-b8a7d439db0cfd765ed4bfedd2bbaeeee58b05a5.zip | |
Merge commit 'aa9bc8612514d216f84eec218dfd19ab83f3598a' into sync-from-ra
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 b8469383183..a28ee5f1ca2 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 b7dbc82e1d6..c2ebf03746a 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>, |
