Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions compiler/rustc_privacy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ impl ReachEverythingInTheInterfaceVisitor<'_, '_> {
}
}

DefKind::TraitAlias | DefKind::Fn => {
DefKind::TraitAlias | DefKind::Fn | DefKind::TyAlias => {
self.ev.queue.insert(def_id);
}

Expand All @@ -808,7 +808,6 @@ impl ReachEverythingInTheInterfaceVisitor<'_, '_> {

// Can't be reached
DefKind::Impl { .. }
| DefKind::TyAlias
| DefKind::Field
| DefKind::Variant
| DefKind::Static { .. }
Expand Down
20 changes: 20 additions & 0 deletions tests/ui/privacy/reach-type-alias-issue-156778.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//@ check-pass
#![feature(lazy_type_alias)]

use src::hidden_core;
mod src {
mod aliases {
use hidden_core::InternalStruct;
pub type ExposedType = InternalStruct<f32>;
}
pub mod hidden_core {
use super::aliases::ExposedType;
pub struct InternalStruct<T> {
_x: T,
}
pub fn new() -> ExposedType {
InternalStruct { _x: 1.0 }
}
}
}
fn main() {}
Loading