diff options
| author | Skynoodle <iainrobert.maciver@gmail.com> | 2021-01-02 15:46:41 +0000 |
|---|---|---|
| committer | Skynoodle <iainrobert.maciver@gmail.com> | 2021-01-02 15:46:41 +0000 |
| commit | 750c52af7334e325e9c3980dbdad10dedeb22f82 (patch) | |
| tree | 9ee899497e1feae7d71fa728df9d7f1ddc7c549f /compiler | |
| parent | 91f436b456130561d514c5e7050486cb0768996f (diff) | |
| download | rust-750c52af7334e325e9c3980dbdad10dedeb22f82.tar.gz rust-750c52af7334e325e9c3980dbdad10dedeb22f82.zip | |
Add snake case lint note about keyword identifiers which cannot be raw
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_lint/src/nonstandard_style.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_lint/src/nonstandard_style.rs b/compiler/rustc_lint/src/nonstandard_style.rs index 39cebe7f969..8bb3ff0dde0 100644 --- a/compiler/rustc_lint/src/nonstandard_style.rs +++ b/compiler/rustc_lint/src/nonstandard_style.rs @@ -283,6 +283,7 @@ impl NonSnakeCase { if sc_ident.name.can_be_raw() { ("rename the identifier or convert it to a snake case raw identifier", sc_ident.to_string()) } else { + err.note(&format!("`{}` cannot be used as a raw identifier", sc)); ("rename the identifier", String::new()) } } else { |
