This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -2240,9 +2240,14 @@ fn write_in_place_with_drop<T>(
2240
2240
}
2241
2241
}
2242
2242
2243
+ #[ rustc_unsafe_specialization_marker]
2244
+ trait SourceIterMarker : SourceIter < Source : AsIntoIter > { }
2245
+
2246
+ impl < T > SourceIterMarker for T where T : SourceIter < Source : AsIntoIter > { }
2247
+
2243
2248
impl < T , I > SpecFrom < T , I > for Vec < T >
2244
2249
where
2245
- I : Iterator < Item = T > + InPlaceIterable + SourceIter < Source : AsIntoIter > ,
2250
+ I : Iterator < Item = T > + InPlaceIterable + SourceIterMarker ,
2246
2251
{
2247
2252
default fn from_iter ( mut iterator : I ) -> Self {
2248
2253
// Additional requirements which cannot expressed via trait bounds. We rely on const eval
@@ -3015,6 +3020,7 @@ unsafe impl<T> SourceIter for IntoIter<T> {
3015
3020
}
3016
3021
3017
3022
// internal helper trait for in-place iteration specialization.
3023
+ #[ rustc_specialization_trait]
3018
3024
pub ( crate ) trait AsIntoIter {
3019
3025
type Item ;
3020
3026
fn as_into_iter ( & mut self ) -> & mut IntoIter < Self :: Item > ;
Original file line number Diff line number Diff line change @@ -53,4 +53,5 @@ unsafe impl<I: TrustedLen + ?Sized> TrustedLen for &mut I {}
53
53
///
54
54
/// [`SourceIter`]: ../../std/iter/trait.SourceIter.html
55
55
#[ unstable( issue = "none" , feature = "inplace_iteration" ) ]
56
+ #[ rustc_specialization_trait]
56
57
pub unsafe trait InPlaceIterable : Iterator { }
You can’t perform that action at this time.
0 commit comments