Trait impls

Closes #17750

r? @nikomatsakis