forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#102321 - aDotInTheVoid:rdj-prim-impls, r=Gu…
…illaumeGomez Rustdoc-Json: List impls for primitives Closes rust-lang#101695 Partially addresses rust-lang#100961 r? `@GuillaumeGomez`
- Loading branch information
Showing
9 changed files
with
60 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#![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 | ||
} | ||
|
||
// @is "$.index[*][?(@.docs=='Only core can do this')].inner.items[*]" $identity | ||
} | ||
|
||
// @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 | ||
#[doc(primitive = "i32")] | ||
mod prim_i32 {} | ||
|
||
// @set i32 = "$.index[*][?(@.docs=='i32')].id" | ||
// @is "$.index[*][?(@.docs=='i32')].name" '"i32"' | ||
// @is "$.index[*][?(@.docs=='i32')].inner.name" '"i32"' | ||
// @ismany "$.index[*][?(@.docs=='i32')].inner.impls[*]" $impl_i32 $impl_trait_for_i32 |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters