# Unbaked Idea: DRY using "parameterized inline modules"

**URL:** <https://internals.rust-lang.org/t/unbaked-idea-dry-using-parameterized-inline-modules/7805>\
**Category:** Uncategorized\
**Created:** [June 26, 2018, 5:30am UTC](https://internals.rust-lang.org/t/unbaked-idea-dry-using-parameterized-inline-modules/7805 "2018-06-26T05:30:50Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![jdm](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/jdm/32/822_2.png) [@jdm](https://internals.rust-lang.org/u/jdm)\
**Post date:** [July 12, 2018, 6:19pm UTC](https://internals.rust-lang.org/t/unbaked-idea-dry-using-parameterized-inline-modules/7805/21 "2018-07-12T18:19:18Z")

</div>

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](https://github.com/retep007/servo_1/compare/different-servoparser) 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.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/system/32/14092_2.png) [@system](https://internals.rust-lang.org/u/system)\
**Post date:** [March 25, 2019, 8:30am UTC](https://internals.rust-lang.org/t/unbaked-idea-dry-using-parameterized-inline-modules/7805/22 "2019-03-25T08:30:26Z")

</div>

Closed on March 25, 2019, 8:30am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

[Previous page](https://internals.rust-lang.org/t/unbaked-idea-dry-using-parameterized-inline-modules/7805.md?page=1)
