mirror of
https://github.com/rust-lang/rust
synced 2024-09-06 01:11:17 +00:00
Fix regression for private in public
This commit is contained in:
parent
1f828f0155
commit
51eb0c3b36
|
@ -1584,6 +1584,7 @@ fn first_non_private<'tcx>(
|
|||
if let Some(use_def_id) = reexp.id() &&
|
||||
let Some(local_use_def_id) = use_def_id.as_local() &&
|
||||
let Some(hir::Node::Item(item)) = hir.find_by_def_id(local_use_def_id) &&
|
||||
!item.ident.name.is_empty() &&
|
||||
let hir::ItemKind::Use(path, _) = item.kind
|
||||
{
|
||||
for res in &path.res {
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
pub struct Ident;
|
13
tests/rustdoc/private-use.rs
Normal file
13
tests/rustdoc/private-use.rs
Normal file
|
@ -0,0 +1,13 @@
|
|||
// Regression test for <https://github.com/rust-lang/rust/pull/113374> to
|
||||
// ensure it doesn't panic.
|
||||
|
||||
mod generics {
|
||||
pub enum WherePredicate {
|
||||
EqPredicate,
|
||||
}
|
||||
}
|
||||
pub mod visit {
|
||||
use *;
|
||||
pub fn visit_where_predicate<V>(_visitor: &mut V, _i: &WherePredicate) {}
|
||||
}
|
||||
pub use generics::*;
|
Loading…
Reference in a new issue