1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*!
[`windows_mut()`]: windows_mut()
[HKT!]: higher_kinded_types::HKT!
[higher-kinded]: higher_kinded_types
[`lending_iterator::adapters`]: lending_iterator::adapters
*/
#![cfg_attr(feature = "better-docs",
    cfg_attr(all(), doc = include_str!("../README.md")),
    feature(doc_cfg, doc_notable_trait),
    // for macro_vis
    feature(decl_macro, rustc_attrs),
)]
#![no_std]
#![forbid(unsafe_code)]
#![allow(nonstandard_style, uncommon_codepoints)]

#[macro_use]
mod utils;

#[doc(inline)]
pub use self::{
    lending_iterator::{
        LendingIterator,
        constructors::{
            FromFn,
            from_fn,
            from_iter,
            repeat_mut,
            windows_mut_::windows_mut,
        },
    },
};

/// <code>[#\[::nougat::gat\]]</code>
///
/// [#\[::nougat::gat\]]: https://docs.rs/nougat/*/nougat/attr.gat.html
///
/// Using this attribute is needed when implementing `LendingIterator` for your
/// own types, as well as **for reëxporting the `LendingIterator` trait**,
/// itself, in a way that remains compatible with further downstream
/// implementations down the line: `#[gat(Item)] use …::LendingIterator;`.
///
///   - See the documentation of <code>[#\[::nougat::gat\]]</code> for more info
///     about this.
pub use ::nou::gat;

#[doc(inline)]
#[apply(cfg_futures)]
pub use self::lending_iterator::constructors::from_stream;

#[cfg(feature = "alloc")]
extern crate alloc;

#[macro_use]
extern crate extension_traits;

#[macro_use]
extern crate macro_rules_attribute;

extern crate nougat as nou;

#[macro_use]
extern crate polonius_the_crab;

pub
mod higher_kinded_types;

#[path = "lending_iterator/_mod.rs"]
pub
mod lending_iterator;

/// The crate's prelude.
pub
mod prelude;

// macro internals
#[doc(hidden)] /** Not part of the public API */ pub
mod  {
    pub use {
        ::core::{ // or `std`
            self,
        },
        ::lending_iterator_proc_macros::{
            self,
        },
    };
}

#[doc(hidden)] /** Not part of the public API */ pub
enum HKT<T : ?Sized> {
    HKT,
    _ඞ((
        ::never_say_never::Never,
        ::core::marker::PhantomData<T>,
    )),
}
#[doc(hidden)] /** Not part of the public API */ pub
use HKT::*;

#[cfg_attr(feature = "ui-tests",
    cfg_attr(all(), doc = include_str!("compile_fail_tests.md")),
)]
mod _compile_fail_tests {}