From 8d305680e6560debaf7868c160112e07a7bea8a0 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Tue, 2 Mar 2021 14:41:01 +0100 Subject: Show docs on hover for keywords and primitives --- crates/ide_db/src/helpers.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/ide_db/src/helpers.rs') diff --git a/crates/ide_db/src/helpers.rs b/crates/ide_db/src/helpers.rs index f9de8ce0e..3ff77400b 100644 --- a/crates/ide_db/src/helpers.rs +++ b/crates/ide_db/src/helpers.rs @@ -41,6 +41,10 @@ pub struct FamousDefs<'a, 'b>(pub &'a Semantics<'b, RootDatabase>, pub Option { pub const FIXTURE: &'static str = include_str!("helpers/famous_defs_fixture.rs"); + pub fn std(&self) -> Option { + self.find_crate("std") + } + pub fn core(&self) -> Option { self.find_crate("core") } -- cgit v1.2.3