profile
viewpoint

Ask questionsTrait objects for multiple traits

Given arbitrary traits Foo and Bar, it'd be great to have Box<Foo + Bar> compile, but there are unresolved questions that need to be laid out explicitly. (Moved from https://github.com/rust-lang/rust/issues/32220)

rust-lang/rfcs

Answer questions scottmcm

@jgarvin Good comment! Makes me think that, rather than Send and Sync being special, perhaps they should just be ordinary #[marker] traits, and all #[marker] traits should get the "can be added to other traits in dyn" behaviour.

EDIT: Come to think of it, the "trait addition ok" is probably an OIBITauto trait behaviour, not special to Send/Sync.

useful!

Related questions

Unify closure and block hot 1
Naming arguments in Fn traits hot 1
Test timeouts hot 1
Add hashmap, hashset, treemap, and treeset macros hot 1
Arrays should impl the bitwise operations hot 1
Allow omission of unsatisfiable members in trait impls hot 1
Add impl TryFrom<T> for E where E is a C-like #[repr(T)] enum hot 1
Add impl TryFrom<T> for E where E is a C-like #[repr(T)] enum hot 1
Should lossy conversions be compiler warning hot 1
Consider adding Linux targets that don't depend on libc hot 1
Arrays should impl the bitwise operations hot 1
source:https://uonfu.com/
Github User Rank List