Struct ra_ap_ide_db::helpers::FamousDefs [−][src]
pub struct FamousDefs<'a, 'b>(pub &'a Semantics<'b, RootDatabase>, pub Option<Crate>);
Expand description
Helps with finding well-know things inside the standard library. This is somewhat similar to the known paths infra inside hir, but it different; We want to make sure that IDE specific paths don’t become interesting inside the compiler itself as well.
Note that, by default, rust-analyzer tests do not include core or std
libraries. If you are writing tests for functionality using FamousDefs
,
you’d want to include minicore (see test_utils::MiniCore
) declaration at
the start of your tests:
//- minicore: iterator, ord, derive
Tuple Fields
0: &'a Semantics<'b, RootDatabase>
1: Option<Crate>
Implementations
Auto Trait Implementations
impl<'a, 'b> !RefUnwindSafe for FamousDefs<'a, 'b>
impl<'a, 'b> !Send for FamousDefs<'a, 'b>
impl<'a, 'b> !Sync for FamousDefs<'a, 'b>
impl<'a, 'b> Unpin for FamousDefs<'a, 'b> where
'b: 'a,
impl<'a, 'b> !UnwindSafe for FamousDefs<'a, 'b>
Blanket Implementations
Mutably borrows from an owned value. Read more
fn cast<U>(self, interner: &<U as HasInterner>::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
fn cast<U>(self, interner: &<U as HasInterner>::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
Cast a value to type U
using CastTo
.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more