Skip to content

Commit 6e90f0e

Browse files
committed
fix(embedded): report parse errors
Before we were delegating to rustc for errors but that doesn't help with commands like `cargo metadata`.
1 parent 0f964d3 commit 6e90f0e

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/cargo/util/toml/embedded.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,7 @@ pub fn expand_manifest(
1515
path: &std::path::Path,
1616
config: &Config,
1717
) -> CargoResult<String> {
18-
let comment = match extract_comment(content) {
19-
Ok(comment) => comment,
20-
Err(err) => {
21-
tracing::trace!("failed to extract doc comment: {err}");
22-
None
23-
}
24-
}
25-
.unwrap_or_default();
18+
let comment = extract_comment(content)?.unwrap_or_default();
2619
let manifest = match extract_manifest(&comment)? {
2720
Some(manifest) => Some(manifest),
2821
None => {

0 commit comments

Comments
 (0)