]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0469.md
Rollup merge of #92310 - ehuss:rustdoc-ice, r=estebank
[rust.git] / compiler / rustc_error_codes / src / error_codes / E0469.md
1 A macro listed for import was not found.
2
3 Erroneous code example:
4
5 ```compile_fail,E0469
6 #[macro_use(drink, be_merry)] // error: imported macro not found
7 extern crate alloc;
8
9 fn main() {
10     // ...
11 }
12 ```
13
14 Either the listed macro is not contained in the imported crate, or it is not
15 exported from the given crate.
16
17 This could be caused by a typo. Did you misspell the macro's name?
18
19 Double-check the names of the macros listed for import, and that the crate
20 in question exports them.
21
22 A working version would be:
23
24 ```ignore (cannot-doctest-multicrate-project)
25 // In some_crate crate:
26 #[macro_export]
27 macro_rules! eat {
28     ...
29 }
30
31 #[macro_export]
32 macro_rules! drink {
33     ...
34 }
35
36 // In your crate:
37 #[macro_use(eat, drink)]
38 extern crate some_crate; //ok!
39 ```