internal: switch some tests to minicore
This commit is contained in:
parent
604267088c
commit
ee7b649d44
@ -1492,7 +1492,7 @@ fn test<T: Trait<Type = u32>>(x: T, y: impl Trait<Type = i64>) {
|
||||
fn impl_trait_assoc_binding_projection_bug() {
|
||||
check_types(
|
||||
r#"
|
||||
//- /main.rs crate:main deps:std
|
||||
//- minicore: iterator
|
||||
pub trait Language {
|
||||
type Kind;
|
||||
}
|
||||
@ -1512,20 +1512,6 @@ fn api_walkthrough() {
|
||||
node.clone();
|
||||
} //^ {unknown}
|
||||
}
|
||||
|
||||
//- /std.rs crate:std
|
||||
#[prelude_import] use iter::*;
|
||||
mod iter {
|
||||
trait IntoIterator {
|
||||
type Item;
|
||||
}
|
||||
trait Iterator {
|
||||
type Item;
|
||||
}
|
||||
impl<T: Iterator> IntoIterator for T {
|
||||
type Item = <T as Iterator>::Item;
|
||||
}
|
||||
}
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
@ -227,6 +227,13 @@ pub trait IntoIterator {
|
||||
#[lang = "into_iter"]
|
||||
fn into_iter(self) -> Self::IntoIter;
|
||||
}
|
||||
impl<I: Iterator> IntoIterator for I {
|
||||
type Item = I::Item;
|
||||
type IntoIter = I;
|
||||
fn into_iter(self) -> I {
|
||||
self
|
||||
}
|
||||
}
|
||||
}
|
||||
pub use self::collect::IntoIterator;
|
||||
pub use self::iterator::Iterator;
|
||||
|
Loading…
Reference in New Issue
Block a user