diff options
| author | Lukas Wirth <lukastw97@gmail.com> | 2025-01-20 16:42:34 +0100 |
|---|---|---|
| committer | Lukas Wirth <lukastw97@gmail.com> | 2025-01-20 17:00:28 +0100 |
| commit | e9b410d29ce996abc31bd85f8168936f6eeda2aa (patch) | |
| tree | bb4952029e49983a2a59376853d4d67073b377f3 /src/tools/rust-analyzer/crates/ide-db | |
| parent | 4bc683dfd2934ed7e9ae055e393f06ecf9115b19 (diff) | |
| download | rust-e9b410d29ce996abc31bd85f8168936f6eeda2aa.tar.gz rust-e9b410d29ce996abc31bd85f8168936f6eeda2aa.zip | |
Goto `Display::fmt` when invoked on `to_string`
Diffstat (limited to 'src/tools/rust-analyzer/crates/ide-db')
| -rw-r--r-- | src/tools/rust-analyzer/crates/ide-db/src/famous_defs.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tools/rust-analyzer/crates/ide-db/src/famous_defs.rs b/src/tools/rust-analyzer/crates/ide-db/src/famous_defs.rs index 1dc61e3f0a8..7039d83a5d1 100644 --- a/src/tools/rust-analyzer/crates/ide-db/src/famous_defs.rs +++ b/src/tools/rust-analyzer/crates/ide-db/src/famous_defs.rs @@ -142,6 +142,13 @@ impl FamousDefs<'_, '_> { self.find_macro("core:unimplemented") } + pub fn core_fmt_Display(&self) -> Option<Trait> { + self.find_trait("core:fmt:Display") + } + + pub fn alloc_string_ToString(&self) -> Option<Trait> { + self.find_trait("alloc:string:ToString") + } pub fn builtin_crates(&self) -> impl Iterator<Item = Crate> { IntoIterator::into_iter([ self.std(), |
