1
Fork 0

Implement lint against Symbol::intern on a string literal

This commit is contained in:
clubby789 2024-11-27 17:21:59 +00:00
parent c322cd5c5a
commit 72d2db7bf4
6 changed files with 54 additions and 2 deletions

View file

@ -772,6 +772,9 @@ lint_suspicious_double_ref_clone =
lint_suspicious_double_ref_deref =
using `.deref()` on a double reference, which returns `{$ty}` instead of dereferencing the inner type
lint_symbol_intern_string_literal = using `Symbol::intern` on a string literal
.help = consider adding the symbol to `compiler/rustc_span/src/symbol.rs`
lint_trailing_semi_macro = trailing semicolon in macro used in expression position
.note1 = macro invocations at the end of a block are treated as expressions
.note2 = to ignore the value produced by the macro, add a semicolon after the invocation of `{$name}`