rustdoc JSON: Fix ICE with pub extern crate self as <self_crate_name>
This commit is contained in:
parent
75b7e52e92
commit
dbeb506eae
@ -209,11 +209,11 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> {
|
||||
}
|
||||
|
||||
types::ItemEnum::Method(_)
|
||||
| types::ItemEnum::Module(_)
|
||||
| types::ItemEnum::AssocConst { .. }
|
||||
| types::ItemEnum::AssocType { .. }
|
||||
| types::ItemEnum::PrimitiveType(_) => true,
|
||||
types::ItemEnum::Module(_)
|
||||
| types::ItemEnum::ExternCrate { .. }
|
||||
types::ItemEnum::ExternCrate { .. }
|
||||
| types::ItemEnum::Import(_)
|
||||
| types::ItemEnum::StructField(_)
|
||||
| types::ItemEnum::Variant(_)
|
||||
|
@ -0,0 +1,11 @@
|
||||
//! Regression test for <https://github.com/rust-lang/rust/issues/100531>
|
||||
|
||||
#![feature(no_core)]
|
||||
#![no_core]
|
||||
|
||||
#![crate_name = "export_extern_crate_as_self"]
|
||||
|
||||
// ignore-tidy-linelength
|
||||
|
||||
// @is export_extern_crate_as_self.json "$.index[*][?(@.kind=='module')].name" \"export_extern_crate_as_self\"
|
||||
pub extern crate self as export_extern_crate_as_self; // Must be the same name as the crate already has
|
Loading…
x
Reference in New Issue
Block a user