Skip to content

Commit ebdea09

Browse files
nnethercoteFirestar99
authored andcommitted
Rename parsing_error as parse_error.
`parsing_error` reads strangely. `parse_error` is much more normal.
1 parent a28bd3a commit ebdea09

File tree

1 file changed

+10
-10
lines changed
  • crates/spirv-std/macros/src

1 file changed

+10
-10
lines changed

crates/spirv-std/macros/src/lib.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ impl syn::parse::Parse for DebugPrintfInput {
333333
}
334334
}
335335

336-
fn parsing_error(message: &str, span: Span) -> TokenStream {
336+
fn parse_error(message: &str, span: Span) -> TokenStream {
337337
syn::Error::new(span, message).to_compile_error().into()
338338
}
339339

@@ -391,7 +391,7 @@ fn debug_printf_inner(input: DebugPrintfInput) -> TokenStream {
391391
if ch == '%' {
392392
ch = match chars.next() {
393393
Some('%') => continue,
394-
None => return parsing_error("Unterminated format specifier", span),
394+
None => return parse_error("Unterminated format specifier", span),
395395
Some(ch) => ch,
396396
};
397397

@@ -401,7 +401,7 @@ fn debug_printf_inner(input: DebugPrintfInput) -> TokenStream {
401401
ch = match chars.next() {
402402
Some(ch) => ch,
403403
None => {
404-
return parsing_error(
404+
return parse_error(
405405
"Unterminated format specifier: missing type after precision",
406406
span,
407407
);
@@ -415,7 +415,7 @@ fn debug_printf_inner(input: DebugPrintfInput) -> TokenStream {
415415
ch = match chars.next() {
416416
Some(ch) => ch,
417417
None => {
418-
return parsing_error(
418+
return parse_error(
419419
"Unterminated format specifier: missing type after decimal point",
420420
span,
421421
);
@@ -426,7 +426,7 @@ fn debug_printf_inner(input: DebugPrintfInput) -> TokenStream {
426426
ch = match chars.next() {
427427
Some(ch) => ch,
428428
None => {
429-
return parsing_error(
429+
return parse_error(
430430
"Unterminated format specifier: missing type after fraction precision",
431431
span,
432432
);
@@ -441,20 +441,20 @@ fn debug_printf_inner(input: DebugPrintfInput) -> TokenStream {
441441
Some('3') => 3,
442442
Some('4') => 4,
443443
Some(ch) => {
444-
return parsing_error(&format!("Invalid width for vector: {ch}"), span);
444+
return parse_error(&format!("Invalid width for vector: {ch}"), span);
445445
}
446-
None => return parsing_error("Missing vector dimensions specifier", span),
446+
None => return parse_error("Missing vector dimensions specifier", span),
447447
};
448448

449449
ch = match chars.next() {
450450
Some(ch) => ch,
451-
None => return parsing_error("Missing vector type specifier", span),
451+
None => return parse_error("Missing vector type specifier", span),
452452
};
453453

454454
let ty = match map_specifier_to_type(ch, &mut chars) {
455455
Some(ty) => ty,
456456
_ => {
457-
return parsing_error(
457+
return parse_error(
458458
&format!("Unrecognised vector type specifier: '{ch}'"),
459459
span,
460460
);
@@ -466,7 +466,7 @@ fn debug_printf_inner(input: DebugPrintfInput) -> TokenStream {
466466
let ty = match map_specifier_to_type(ch, &mut chars) {
467467
Some(ty) => ty,
468468
_ => {
469-
return parsing_error(
469+
return parse_error(
470470
&format!("Unrecognised format specifier: '{ch}'"),
471471
span,
472472
);

0 commit comments

Comments
 (0)