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
#![cfg_attr(feature = "better-docs",
    cfg_attr(all(), doc = include_str!("../README.md")),
)]
#![no_std]
#![forbid(unsafe_code)]

/// See [the main docs][crate] for more info.
///
/// ## Advanced features
///
/// ### Extending the trait's privacy
///
/// This can be achieved by prepending a `pub` annotation before the
/// `trait Name` argument:
///
/// ```rust ,no_run
/// #[macro_use]
/// extern crate ext_trait;
///
/// mod lib {
///     //          vvv
///     #[extension(pub trait NoOp)]
///     impl<T> T {
///         fn no_op(self) -> Self { self }
///     }
/// }
///
/// fn main ()
/// {
///     use lib::NoOp;
///     let x = 42.no_op().no_op().no_op().no_op().no_op().no_op();
/// }
/// ```

pub use ::ext_trait_proc_macros::extension;

// macro internals
#[doc(hidden)] /** Not part of the public API */ pub
mod __ {
    pub use ::core;
}

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