mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-30 13:06:28 +03:00
Privacy: enqueue type alias
This commit is contained in:
@@ -783,7 +783,7 @@ fn enqueue_def_id(&mut self, def_id: LocalDefId) {
|
||||
}
|
||||
}
|
||||
|
||||
DefKind::TraitAlias | DefKind::Fn => {
|
||||
DefKind::TraitAlias | DefKind::Fn | DefKind::TyAlias => {
|
||||
self.ev.queue.insert(def_id);
|
||||
}
|
||||
|
||||
@@ -808,7 +808,6 @@ fn enqueue_def_id(&mut self, def_id: LocalDefId) {
|
||||
|
||||
// Can't be reached
|
||||
DefKind::Impl { .. }
|
||||
| DefKind::TyAlias
|
||||
| DefKind::Field
|
||||
| DefKind::Variant
|
||||
| DefKind::Static { .. }
|
||||
|
||||
@@ -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() {}
|
||||
Reference in New Issue
Block a user