From bec9f9223cefb50cdb4a9b8a7d056545fa3641c2 Mon Sep 17 00:00:00 2001 From: The8472 Date: Tue, 19 May 2020 00:44:16 +0200 Subject: apply required min_specialization attributes --- library/alloc/src/vec.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'library/alloc/src') diff --git a/library/alloc/src/vec.rs b/library/alloc/src/vec.rs index db012762419..c0c63a27be5 100644 --- a/library/alloc/src/vec.rs +++ b/library/alloc/src/vec.rs @@ -2240,9 +2240,14 @@ fn write_in_place_with_drop( } } +#[rustc_unsafe_specialization_marker] +trait SourceIterMarker: SourceIter {} + +impl SourceIterMarker for T where T: SourceIter {} + impl SpecFrom for Vec where - I: Iterator + InPlaceIterable + SourceIter, + I: Iterator + InPlaceIterable + SourceIterMarker, { default fn from_iter(mut iterator: I) -> Self { // Additional requirements which cannot expressed via trait bounds. We rely on const eval @@ -3015,6 +3020,7 @@ unsafe impl SourceIter for IntoIter { } // internal helper trait for in-place iteration specialization. +#[rustc_specialization_trait] pub(crate) trait AsIntoIter { type Item; fn as_into_iter(&mut self) -> &mut IntoIter; -- cgit 1.4.1-3-g733a5