fix(embedded): report parse errors

Before we were delegating to rustc for errors but that doesn't help with
commands like `cargo metadata`.
This commit is contained in:
Ed Page 2023-09-16 17:10:00 -05:00
parent 0f964d3bdf
commit 6e90f0ef6e

View File

@ -15,14 +15,7 @@ pub fn expand_manifest(
path: &std::path::Path,
config: &Config,
) -> CargoResult<String> {
let comment = match extract_comment(content) {
Ok(comment) => comment,
Err(err) => {
tracing::trace!("failed to extract doc comment: {err}");
None
}
}
.unwrap_or_default();
let comment = extract_comment(content)?.unwrap_or_default();
let manifest = match extract_manifest(&comment)? {
Some(manifest) => Some(manifest),
None => {