-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 #106412 - GuillaumeGomez:fix-links-to-primitive-rustd…
…oc-json, r=aDotInTheVoid Fix link generation for local primitive types in rustdoc JSON output Fixes #104064. As mentioned in the issue, I'm not super happy about this fix which is more a hack rather than a sound-proof solution. However I couldn't find a better way to fix it. r? `@aDotInTheVoid`
- Loading branch information
Showing
2 changed files
with
44 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Regression test for <https://github.com/rust-lang/rust/issues/104064>. | ||
|
||
#![feature(no_core)] | ||
#![feature(rustc_attrs)] | ||
#![feature(rustdoc_internals)] | ||
#![no_core] | ||
#![rustc_coherence_is_core] | ||
|
||
//! Link to [i32][prim@i32] [i64][prim@i64] | ||
#[doc(primitive = "i32")] | ||
mod prim_i32 {} | ||
|
||
// @set local_i32 = "$.index[*][?(@.name=='i32')].id" | ||
|
||
// @has "$.index[*][?(@.name=='local_primitive')]" | ||
// @ismany "$.index[*][?(@.name=='local_primitive')].inner.items[*]" $local_i32 | ||
// @is "$.index[*][?(@.name=='local_primitive')].links['prim@i32']" $local_i32 | ||
|
||
// Let's ensure the `prim_i32` module isn't present in the output JSON: | ||
// @!has "$.index[*][?(@.name=='prim_i32')]" |