|
42 | 42 | //! but it still needs to be re-exported to them |
43 | 43 | //! (because of limitations in `macro_rules!`). |
44 | 44 | //! |
45 | | -//! To avoid name collisions, we and a long and explicit prefix in the function’s name. |
| 45 | +//! To avoid name collisions, we include a long and explicit prefix in the function’s name. |
46 | 46 | //! |
47 | 47 | //! The function takes a string containing arbitrary Rust tokens, |
48 | 48 | //! and returns a string that is parsed as *items*. |
|
73 | 73 | //! version = "1.0.0" |
74 | 74 | //! |
75 | 75 | //! [dependencies] |
76 | | -//! cssparser-macros = {path = "./macros", version = "1.0"} |
| 76 | +//! libfoo-macros = {path = "./macros", version = "1.0"} |
77 | 77 | //! ``` |
78 | 78 | //! |
79 | 79 | //! ```rust |
|
98 | 98 | //! |
99 | 99 | //! Let’s go trough the numbered lines one by one: |
100 | 100 | //! |
101 | | -//! 1. `libfoo` depends on the other `libfoo-macros`, and imports its macros. |
| 101 | +//! 1. `libfoo` depends on `libfoo-macros`, and imports its macros. |
102 | 102 | //! 2. Everything exported by `libfoo-macros` (which is one custom `derive`) |
103 | 103 | //! is re-exported to users of `libfoo`. |
104 | 104 | //! They’re not expected to use it directly, |
|
152 | 152 | //! # More |
153 | 153 | //! |
154 | 154 | //! To see a more complex example, look at |
155 | | -//! [`cssparser`’s `src/macros.rs](https://github.com/servo/rust-cssparser/blob/master/src/macros.rs) |
| 155 | +//! [`cssparser`’s `src/macros.rs`](https://github.com/servo/rust-cssparser/blob/master/src/macros.rs) |
156 | 156 | //! and |
157 | | -//! [`cssparser-macros`’s `macros/lib.rs](https://github.com/servo/rust-cssparser/blob/master/macros/lib.rs). |
| 157 | +//! [`cssparser-macros`’s `macros/lib.rs`](https://github.com/servo/rust-cssparser/blob/master/macros/lib.rs). |
158 | 158 |
|
159 | 159 | /// This macro wraps `&str -> String` functions |
160 | 160 | /// in custom `derive` implementations with `#[proc_macro_derive]`. |
|
0 commit comments