This error was emitted when a valid proc macro crate was loaded. Proc
macros do not contain any import data for now.
gcc/rust/ChangeLog:
* metadata/rust-imports.cc (Import::try_package_in_directory):
Remove error when some macro are found even if no import data is
available.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
close (fd);
- rust_error_at (location,
- "%s exists but does not contain any Rust export data",
- found_filename.c_str ());
+ if (macros.empty ())
+ rust_error_at (location,
+ "%s exists but does not contain any Rust export data",
+ found_filename.c_str ());
return std::make_pair (NULL, macros);
}