aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-06-17 09:41:36 +0100
committerAleksey Kladov <[email protected]>2021-06-17 09:41:36 +0100
commita43bba760ef424f5c849666949b4323f090b6970 (patch)
treee990cc971fa07e3e41c89eeaf75bbe2416b12bd2 /crates/ide_db
parentc42cdff3d2ed2e30add09dd0d602181b6f83534d (diff)
internal: switch some tests to minicore
Diffstat (limited to 'crates/ide_db')
-rw-r--r--crates/ide_db/src/helpers/famous_defs_fixture.rs70
1 files changed, 0 insertions, 70 deletions
diff --git a/crates/ide_db/src/helpers/famous_defs_fixture.rs b/crates/ide_db/src/helpers/famous_defs_fixture.rs
index 312851966..5aa77a24d 100644
--- a/crates/ide_db/src/helpers/famous_defs_fixture.rs
+++ b/crates/ide_db/src/helpers/famous_defs_fixture.rs
@@ -26,76 +26,6 @@ pub mod default {
26 } 26 }
27} 27}
28 28
29pub mod iter {
30 pub use self::traits::{collect::IntoIterator, iterator::Iterator};
31 mod traits {
32 pub(crate) mod iterator {
33 use crate::option::Option;
34 pub trait Iterator {
35 type Item;
36 fn next(&mut self) -> Option<Self::Item>;
37 fn by_ref(&mut self) -> &mut Self {
38 self
39 }
40 fn take(self, n: usize) -> crate::iter::Take<Self> {
41 crate::iter::Take { inner: self }
42 }
43 }
44
45 impl<I: Iterator> Iterator for &mut I {
46 type Item = I::Item;
47 fn next(&mut self) -> Option<I::Item> {
48 (**self).next()
49 }
50 }
51 }
52 pub(crate) mod collect {
53 pub trait IntoIterator {
54 type Item;
55 }
56 }
57 }
58
59 pub use self::sources::*;
60 pub(crate) mod sources {
61 use super::Iterator;
62 use crate::option::Option::{self, *};
63 pub struct Repeat<A> {
64 element: A,
65 }
66
67 pub fn repeat<T>(elt: T) -> Repeat<T> {
68 Repeat { element: elt }
69 }
70
71 impl<A> Iterator for Repeat<A> {
72 type Item = A;
73
74 fn next(&mut self) -> Option<A> {
75 None
76 }
77 }
78 }
79
80 pub use self::adapters::*;
81 pub(crate) mod adapters {
82 use super::Iterator;
83 use crate::option::Option::{self, *};
84 pub struct Take<I> {
85 pub(crate) inner: I,
86 }
87 impl<I> Iterator for Take<I>
88 where
89 I: Iterator,
90 {
91 type Item = <I as Iterator>::Item;
92 fn next(&mut self) -> Option<<I as Iterator>::Item> {
93 None
94 }
95 }
96 }
97}
98
99pub mod ops { 29pub mod ops {
100 #[lang = "fn"] 30 #[lang = "fn"]
101 pub trait Fn<Args>: FnMut<Args> { 31 pub trait Fn<Args>: FnMut<Args> {