Existential types in Rust
Existential types in Rust
Posted Apr 24, 2024 16:18 UTC (Wed) by mb (subscriber, #50428)Parent article: Existential types in Rust
> type Quux = impl Debug;
> // Later uses of 'Quux' let the compiler infer a concrete type.
> fn function3 -> Quux {
> // Later uses of 'Quux' let the compiler infer a concrete type.
> fn function3 -> Quux {
What are "later uses" exactly?
Later uses in the same file, module, crate? Or is the whole project considered?
Consider the case where `type Quux` is `pub type Quux`. Would that be possible? And what code would be included for type inference when the type is pub?
