mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-26 17:57:19 +00:00
Merge pull request #18986 from Veykril/push-zlwvwlowpzqm
Goto `Display::fmt` when invoked on `to_string`
This commit is contained in:
commit
2c040c03cf
4 changed files with 49 additions and 0 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue