diff options
| author | Xiretza <xiretza@xiretza.xyz> | 2022-09-14 18:35:22 +0200 |
|---|---|---|
| committer | Xiretza <xiretza@xiretza.xyz> | 2022-09-27 20:29:19 +0200 |
| commit | caefac034e55b3cd0568a493c85308e1fc518cda (patch) | |
| tree | 185b728c914af41555313ad2d0d9dccc08671d02 /compiler/rustc_parse/src | |
| parent | 00f95468c4abd82cf71dc17004e1fd2e6cc72213 (diff) | |
| download | rust-caefac034e55b3cd0568a493c85308e1fc518cda.tar.gz rust-caefac034e55b3cd0568a493c85308e1fc518cda.zip | |
Document use of Symbol::to_string()
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/parser/diagnostics.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/parser/diagnostics.rs b/compiler/rustc_parse/src/parser/diagnostics.rs index ccba01630be..5df94331d7b 100644 --- a/compiler/rustc_parse/src/parser/diagnostics.rs +++ b/compiler/rustc_parse/src/parser/diagnostics.rs @@ -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(), }) } |
