File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -201,7 +201,8 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> {
201201
202202 types:: ItemEnum :: Method ( _)
203203 | types:: ItemEnum :: AssocConst { .. }
204- | types:: ItemEnum :: AssocType { .. } => true ,
204+ | types:: ItemEnum :: AssocType { .. }
205+ | types:: ItemEnum :: PrimitiveType ( _) => true ,
205206 types:: ItemEnum :: Module ( _)
206207 | types:: ItemEnum :: ExternCrate { .. }
207208 | types:: ItemEnum :: Import ( _)
@@ -216,8 +217,7 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> {
216217 | types:: ItemEnum :: Static ( _)
217218 | types:: ItemEnum :: ForeignType
218219 | types:: ItemEnum :: Macro ( _)
219- | types:: ItemEnum :: ProcMacro ( _)
220- | types:: ItemEnum :: PrimitiveType ( _) => false ,
220+ | types:: ItemEnum :: ProcMacro ( _) => false ,
221221 } ;
222222 let removed = self
223223 . index
Original file line number Diff line number Diff line change 1+ // compile-flags: --document-private-items
2+
3+ // Regression test for <https://github.com/rust-lang/rust/issues/98006>.
4+
5+ #![ feature( rustdoc_internals) ]
6+ #![ feature( no_core) ]
7+
8+ #![ no_core]
9+
10+ // @has primitive_overloading.json
11+ // @has - "$.index[*][?(@.name=='usize')]"
12+ // @has - "$.index[*][?(@.name=='prim')]"
13+
14+ #[ doc( primitive = "usize" ) ]
15+ /// This is the built-in type `usize`.
16+ mod prim {
17+ }
You can’t perform that action at this time.
0 commit comments