implied_bounds/_lib.rs
1#![doc = include_str!("../README.md")]
2#![no_std]
3#![forbid(unsafe_code)]
4#![allow(unused_braces)]
5
6pub use helper_trait::ImpliedPredicate;
7mod helper_trait;
8
9/// Convenience attribute macro to help one rewrite a `trait` definition as per the rules described
10/// in the documentation of [`ImpliedPredicate`].
11///
12/// Indeed, that trait is very handy, but its usage is neither very obvious to write, nor very
13/// readable afterwards.
14///
15/// But it is actually a very mechanical operation, hence being a good fit for macro automation 🙂
16pub use ::implied_bounds_proc_macros::implied_bounds;
17
18// macro internals
19#[doc(hidden)] /** Not part of the public API */ pub
20mod à¶ž {
21 pub use ::core; // or `std`
22
23 /// We reëxport this, and rename it, merely so the diagnostics read a bit more nicely:
24 ///
25 /// That way we get:
26 ///
27 /// > which is required by `<Bar as implied_bounds::ඞ::ImpliedPredicate<…>`
28 ///
29 /// instead of:
30 ///
31 /// > which is required by `<Bar as implied_bounds::helper_trait::HasAssoc<…>`
32 pub use crate::helper_trait::HasAssoc as ImpliedPredicate;
33}
34
35#[doc = include_str!("compile_fail_tests.md")]
36mod _compile_fail_tests {}