What do you think of this, in the Alternatives section:
impl TR for S {
delegate to f for *;
}
impl TR for S {
delegate to f for fn foo, fn bar, const MAX, type Item;
}
The transition to delegation target block syntax isn’t quite as nice, but it still works:
delegate fn foo, fn bar {
&self => self.get_inner(),
&mut self => self.get_inner_mut(),
self => self.into_inner(),
Self <= Obj::from_inner(self)
}
The argument for this syntax is “when trait items are explicitly listed rather than globbed, the line quickly becomes long and difficult to read.” However, this can be solved by moving to field_name; to a new line, e.g.
impl TR for S {
delegate fn foo, fn bar, fn baz, const MAX, type Item, type Output
to really_long_field_name;
}
EDIT: We could make this a rule in rustfmt: when not delegating * move to field_name; to a new line. This would make it stand out visually.