≈ the.bay.news

Impl mut and override for incremental, scoped reuse of existing impls

Rust Internals
Impl mut and override for incremental, scoped reuse of existing impls
Summary This proposal lets a downstream crate replace one method of an existing concrete impl while keeping the rest, via an opt-in impl mut marker and override blocks that forward unlisted methods to super. Concretely, it adds two new items: · impl mut Trait for Type { ... } marks an existing impl as open for override. · override Trait for Type { ... } creates a new implementation that only specifies the methods it changes; unlisted methods are implicitly forwarded to the override target. I...

0 comments

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

No comments yet.