We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0cbd02f commit b6326d3Copy full SHA for b6326d3
src/cargo/util/frontmatter.rs
@@ -103,8 +103,11 @@ impl<'s> ScriptSource<'s> {
103
let close_start = input.current_token_start();
104
let _ = input.next_slice(len);
105
let close_end = input.current_token_start();
106
+ let fewer_dashes = fence_length - len;
107
return Err(FrontmatterError::new(
- format!("closing code fence has too few `-`"),
108
+ format!(
109
+ "closing code fence has {fewer_dashes} less `-` than the opening fence"
110
+ ),
111
close_start..close_end,
112
));
113
}
tests/testsuite/script/rustc_fixtures/mismatch-2.stderr
@@ -1,4 +1,4 @@
1
-[ERROR] closing code fence has too few `-`
+[ERROR] closing code fence has 1 less `-` than the opening fence
2
--> script:3:1
3
|
4
3 | ---cargo
0 commit comments