Skip to content

Commit caefac0

Browse files
committed
Document use of Symbol::to_string()
1 parent 00f9546 commit caefac0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: compiler/rustc_parse/src/parser/diagnostics.rs

+2
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,8 @@ impl<'a> Parser<'a> {
309309
{
310310
Some(SuggEscapeToUseAsIdentifier {
311311
span: ident.span.shrink_to_lo(),
312+
// `Symbol::to_string()` is different from `Symbol::into_diagnostic_arg()`,
313+
// which uses `Symbol::to_ident_string()` and "helpfully" adds an implicit `r#`
312314
ident_name: ident.name.to_string(),
313315
})
314316
}

0 commit comments

Comments
 (0)