mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
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:
parent
0f964d3bdf
commit
6e90f0ef6e
@ -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 => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user