2022-09-26 12:06:48 -05:00
|
|
|
#![feature(no_core)]
|
|
|
|
#![feature(rustc_attrs)]
|
|
|
|
#![feature(rustdoc_internals)]
|
|
|
|
#![no_core]
|
|
|
|
#![rustc_coherence_is_core]
|
|
|
|
|
|
|
|
// @set impl_i32 = "$.index[*][?(@.docs=='Only core can do this')].id"
|
|
|
|
|
|
|
|
/// Only core can do this
|
|
|
|
impl i32 {
|
|
|
|
// @set identity = "$.index[*][?(@.docs=='Do Nothing')].id"
|
|
|
|
|
|
|
|
/// Do Nothing
|
|
|
|
pub fn identity(self) -> Self {
|
|
|
|
self
|
|
|
|
}
|
|
|
|
|
2023-05-22 12:17:52 -05:00
|
|
|
// @is "$.index[*][?(@.docs=='Only core can do this')].inner.impl.items[*]" $identity
|
2022-09-26 12:06:48 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// @set Trait = "$.index[*][?(@.name=='Trait')].id"
|
|
|
|
pub trait Trait {}
|
|
|
|
// @set impl_trait_for_i32 = "$.index[*][?(@.docs=='impl Trait for i32')].id"
|
|
|
|
/// impl Trait for i32
|
|
|
|
impl Trait for i32 {}
|
|
|
|
|
|
|
|
/// i32
|
2023-03-21 10:44:06 -05:00
|
|
|
#[rustc_doc_primitive = "i32"]
|
2022-09-26 12:06:48 -05:00
|
|
|
mod prim_i32 {}
|
|
|
|
|
|
|
|
// @set i32 = "$.index[*][?(@.docs=='i32')].id"
|
|
|
|
// @is "$.index[*][?(@.docs=='i32')].name" '"i32"'
|
2023-05-22 12:17:52 -05:00
|
|
|
// @is "$.index[*][?(@.docs=='i32')].inner.primitive.name" '"i32"'
|
|
|
|
// @ismany "$.index[*][?(@.docs=='i32')].inner.primitive.impls[*]" $impl_i32 $impl_trait_for_i32
|