From a43bba760ef424f5c849666949b4323f090b6970 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 17 Jun 2021 11:41:36 +0300 Subject: internal: switch some tests to minicore --- crates/ide_db/src/helpers/famous_defs_fixture.rs | 70 ------------------------ 1 file changed, 70 deletions(-) (limited to 'crates/ide_db') 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 { } } -pub mod iter { - pub use self::traits::{collect::IntoIterator, iterator::Iterator}; - mod traits { - pub(crate) mod iterator { - use crate::option::Option; - pub trait Iterator { - type Item; - fn next(&mut self) -> Option; - fn by_ref(&mut self) -> &mut Self { - self - } - fn take(self, n: usize) -> crate::iter::Take { - crate::iter::Take { inner: self } - } - } - - impl Iterator for &mut I { - type Item = I::Item; - fn next(&mut self) -> Option { - (**self).next() - } - } - } - pub(crate) mod collect { - pub trait IntoIterator { - type Item; - } - } - } - - pub use self::sources::*; - pub(crate) mod sources { - use super::Iterator; - use crate::option::Option::{self, *}; - pub struct Repeat { - element: A, - } - - pub fn repeat(elt: T) -> Repeat { - Repeat { element: elt } - } - - impl Iterator for Repeat { - type Item = A; - - fn next(&mut self) -> Option { - None - } - } - } - - pub use self::adapters::*; - pub(crate) mod adapters { - use super::Iterator; - use crate::option::Option::{self, *}; - pub struct Take { - pub(crate) inner: I, - } - impl Iterator for Take - where - I: Iterator, - { - type Item = ::Item; - fn next(&mut self) -> Option<::Item> { - None - } - } - } -} - pub mod ops { #[lang = "fn"] pub trait Fn: FnMut { -- cgit v1.2.3 From ac35645455f9ccdf3019d3c272a1790673cb81fd Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 17 Jun 2021 11:42:43 +0300 Subject: internal: remove dead code --- crates/ide_db/src/helpers/famous_defs_fixture.rs | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'crates/ide_db') diff --git a/crates/ide_db/src/helpers/famous_defs_fixture.rs b/crates/ide_db/src/helpers/famous_defs_fixture.rs index 5aa77a24d..551203936 100644 --- a/crates/ide_db/src/helpers/famous_defs_fixture.rs +++ b/crates/ide_db/src/helpers/famous_defs_fixture.rs @@ -26,30 +26,6 @@ pub mod default { } } -pub mod ops { - #[lang = "fn"] - pub trait Fn: FnMut { - extern "rust-call" fn call(&self, args: Args) -> Self::Output; - } - - #[lang = "fn_mut"] - pub trait FnMut: FnOnce { - extern "rust-call" fn call_mut(&mut self, args: Args) -> Self::Output; - } - #[lang = "fn_once"] - pub trait FnOnce { - #[lang = "fn_once_output"] - type Output; - extern "rust-call" fn call_once(self, args: Args) -> Self::Output; - } - - #[lang = "deref"] - pub trait Deref { - type Target: ?Sized; - fn deref(&self) -> &Self::Target; - } -} - pub mod option { pub enum Option { None, -- cgit v1.2.3