the.bay.news

Pre-RFC: global_generic — crate-level type parameters

Rust Internals
Pre-RFC: global_generic — crate-level type parameters
Pre-RFC: global_generic — crate-level type parameters Summary Add a global_generic declaration that lets a crate expose a type parameter which is bound exactly once, in main.rs, and then used anywhere in the dependency graph as if it were a concrete type. Syntax // lib.rs (or any library crate) global_generic TypeName: TraitName; // main.rs (the binary crate — the only place binding is allowed) global_generic crate::TypeName = ConcreteType; Example // infrastructure/src/lib.rs pub global_gene...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.