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
{{ message }}
Repository navigation
Tracking issue for Replace Vec::drain by a method that accepts a range parameter (RFC 574) #23055
However RangeArgument only implements the first four. Furthermore as things stand it does not appear possible to accept RangeArgument and usize simultaneously, because dispatch doesn't consider the trait bound and reports that conflicting implementations exist.
Activity
Auto merge of #25028 - bluss:drain-string, r=alexcrichton
paulp commentedon Jun 14, 2015
The rfc says
It also includes an example which depends on usize:
However RangeArgument only implements the first four. Furthermore as things stand it does not appear possible to accept RangeArgument and usize simultaneously, because dispatch doesn't consider the trait bound and reports that conflicting implementations exist.
bluss commentedon Jul 13, 2015
@paulp Yes, #24781 was explicit about these issues. I forsee a new RFC to finish off drain and maybe the RangeArgument trait.
alexcrichton commentedon Feb 18, 2016
I believe this has since been implemented
Merge pull request rust-lang#23055 from ChayimFriedman2/guard-let-struct