-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
T-libs-apiRelevant to the library API team, which will review and decide on the RFC.Relevant to the library API team, which will review and decide on the RFC.breaking-changeThe RFC proposes a breaking change.The RFC proposes a breaking change.
Description
In principle the trait Any
works just like a 'top type' trait. However there's the unnecessary bound of 'static involved by the restrictions of downcast
method. So i propose that the 'static bound move to the methods, so Any
can act as a real 'top type' trait.
Use case: When i want to erase the type of a value and just make sure it is alive until a certain point, currently there's no good way to do so. However, with the changes above, i can just put it into a Box<Any + 'a>
.
stepancheg
Metadata
Metadata
Assignees
Labels
T-libs-apiRelevant to the library API team, which will review and decide on the RFC.Relevant to the library API team, which will review and decide on the RFC.breaking-changeThe RFC proposes a breaking change.The RFC proposes a breaking change.