Document use of Symbol::to_string()

This commit is contained in:
Xiretza 2022-09-14 18:35:22 +02:00
parent 00f95468c4
commit caefac034e

View file

@ -309,6 +309,8 @@ impl<'a> Parser<'a> {
{
Some(SuggEscapeToUseAsIdentifier {
span: ident.span.shrink_to_lo(),
// `Symbol::to_string()` is different from `Symbol::into_diagnostic_arg()`,
// which uses `Symbol::to_ident_string()` and "helpfully" adds an implicit `r#`
ident_name: ident.name.to_string(),
})
}