mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
internal: switch some tests to minicore
This commit is contained in:
parent
604267088c
commit
ee7b649d44
2 changed files with 8 additions and 15 deletions
|
@ -1492,7 +1492,7 @@ fn test<T: Trait<Type = u32>>(x: T, y: impl Trait<Type = i64>) {
|
||||||
fn impl_trait_assoc_binding_projection_bug() {
|
fn impl_trait_assoc_binding_projection_bug() {
|
||||||
check_types(
|
check_types(
|
||||||
r#"
|
r#"
|
||||||
//- /main.rs crate:main deps:std
|
//- minicore: iterator
|
||||||
pub trait Language {
|
pub trait Language {
|
||||||
type Kind;
|
type Kind;
|
||||||
}
|
}
|
||||||
|
@ -1512,20 +1512,6 @@ fn api_walkthrough() {
|
||||||
node.clone();
|
node.clone();
|
||||||
} //^ {unknown}
|
} //^ {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 mod iter {
|
||||||
#[lang = "into_iter"]
|
#[lang = "into_iter"]
|
||||||
fn into_iter(self) -> Self::IntoIter;
|
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::collect::IntoIterator;
|
||||||
pub use self::iterator::Iterator;
|
pub use self::iterator::Iterator;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue