Unbaked Idea: DRY using "parameterized inline modules"


#21

This is a feature that I’ve been longing for as part of the massive crate splitting effort being prototyped in Servo right now as a summer of code project. This branch involves replicating the same trait bounds throughout hundreds of structs and functions in a giant crate, and reducing that number would be a huge help. I always imagined it a bit like how closures capture specific parts of their environment - if the compiler came across an undeclared type name, it could look in the enclosing module for any matching generic type and silently use that.