1 //- /libcore.rs crate:core
2 //! Signatures of traits, types and functions from the core lib for use in tests.
6 fn cmp(&self, other: &Self) -> Ordering;
7 fn max(self, other: Self) -> Self;
8 fn min(self, other: Self) -> Self;
9 fn clamp(self, min: Self, max: Self) -> Self;
15 fn from(t: T) -> Self;
19 pub fn into(self) -> T;
30 pub use self::traits::{collect::IntoIterator, iterator::Iterator};
32 pub(crate) mod iterator {
33 use crate::option::Option;
36 fn next(&mut self) -> Option<Self::Item>;
37 fn by_ref(&mut self) -> &mut Self {
40 fn take(self, n: usize) -> crate::iter::Take<Self> {
41 crate::iter::Take { inner: self }
45 impl<I: Iterator> Iterator for &mut I {
47 fn next(&mut self) -> Option<I::Item> {
52 pub(crate) mod collect {
53 pub trait IntoIterator {
59 pub use self::sources::*;
60 pub(crate) mod sources {
62 use crate::option::Option::{self, *};
63 pub struct Repeat<A> {
67 pub fn repeat<T>(elt: T) -> Repeat<T> {
68 Repeat { element: elt }
71 impl<A> Iterator for Repeat<A> {
74 fn next(&mut self) -> Option<A> {
80 pub use self::adapters::*;
81 pub(crate) mod adapters {
83 use crate::option::Option::{self, *};
87 impl<I> Iterator for Take<I>
91 type Item = <I as Iterator>::Item;
92 fn next(&mut self) -> Option<<I as Iterator>::Item> {
101 pub trait Fn<Args>: FnMut<Args> {
102 extern "rust-call" fn call(&self, args: Args) -> Self::Output;
106 pub trait FnMut<Args>: FnOnce<Args> {
107 extern "rust-call" fn call_mut(&mut self, args: Args) -> Self::Output;
110 pub trait FnOnce<Args> {
111 #[lang = "fn_once_output"]
113 extern "rust-call" fn call_once(self, args: Args) -> Self::Output;
127 convert::{From, Into},
129 iter::{IntoIterator, Iterator},
130 ops::{Fn, FnMut, FnOnce},
131 option::Option::{self, *},
136 //- /libstd.rs crate:std deps:core
137 //! Signatures of traits, types and functions from the std lib for use in tests.
139 /// Docs for return_keyword
140 mod return_keyword {}
142 /// Docs for prim_str