From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- .../rustc_error_codes/src/error_codes/E0469.md | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 compiler/rustc_error_codes/src/error_codes/E0469.md (limited to 'compiler/rustc_error_codes/src/error_codes/E0469.md') diff --git a/compiler/rustc_error_codes/src/error_codes/E0469.md b/compiler/rustc_error_codes/src/error_codes/E0469.md new file mode 100644 index 000000000..22db976aa --- /dev/null +++ b/compiler/rustc_error_codes/src/error_codes/E0469.md @@ -0,0 +1,39 @@ +A macro listed for import was not found. + +Erroneous code example: + +```compile_fail,E0469 +#[macro_use(drink, be_merry)] // error: imported macro not found +extern crate alloc; + +fn main() { + // ... +} +``` + +Either the listed macro is not contained in the imported crate, or it is not +exported from the given crate. + +This could be caused by a typo. Did you misspell the macro's name? + +Double-check the names of the macros listed for import, and that the crate +in question exports them. + +A working version would be: + +```ignore (cannot-doctest-multicrate-project) +// In some_crate crate: +#[macro_export] +macro_rules! eat { + ... +} + +#[macro_export] +macro_rules! drink { + ... +} + +// In your crate: +#[macro_use(eat, drink)] +extern crate some_crate; //ok! +``` -- cgit v1.2.3