You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This makes absolutely no sense. First: why would you impl<T: ?Sized> and then not allow you to call any functions on T: !Sized. Second, why can you only call is_null on T: Sized? Makes absolutely no sense.
The text was updated successfully, but these errors were encountered:
This is actually currently intentional! The T: ?Sized means that the impl block is maximally generic by default (we only have one). Each method then adds bounds as necessary, and in this case the is_null method currently requires that T is sized.
At the time this function was written, it was an ICE if T was not sized (hence *const T was a fat pointer). It is intended that one day that ICE and/or restriction will be lifted so this method will not have a T: Sized bound.
So the implementation itself is for T: ?Sized, but the actual functions themselves are for T: Sized.
i.e.
This makes absolutely no sense. First: why would you
impl<T: ?Sized>
and then not allow you to call any functions onT: !Sized
. Second, why can you only callis_null
onT: Sized
? Makes absolutely no sense.The text was updated successfully, but these errors were encountered: