Rollup merge of #133545 - clubby789:symbol-intern-lit, r=jieyouxu

Lint against Symbol::intern on a string literal

Disabled in tests where this doesn't make much sense
This commit is contained in:
Matthias Krüger 2024-12-03 17:27:06 +01:00 committed by GitHub
commit 453a1a8b7f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 94 additions and 37 deletions

View file

@ -775,6 +775,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}`