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:
commit
453a1a8b7f
20 changed files with 94 additions and 37 deletions
|
@ -9,7 +9,7 @@ use rustc_ast::{
|
|||
};
|
||||
use rustc_errors::{Applicability, PResult};
|
||||
use rustc_span::symbol::{Ident, kw, sym};
|
||||
use rustc_span::{ErrorGuaranteed, Span, Symbol};
|
||||
use rustc_span::{ErrorGuaranteed, Span};
|
||||
use thin_vec::{ThinVec, thin_vec};
|
||||
|
||||
use super::{Parser, PathStyle, SeqSep, TokenType, Trailing};
|
||||
|
@ -1136,7 +1136,7 @@ impl<'a> Parser<'a> {
|
|||
Some(ast::Path {
|
||||
span: fn_token_span.to(self.prev_token.span),
|
||||
segments: thin_vec![ast::PathSegment {
|
||||
ident: Ident::new(Symbol::intern("Fn"), fn_token_span),
|
||||
ident: Ident::new(sym::Fn, fn_token_span),
|
||||
id: DUMMY_NODE_ID,
|
||||
args: Some(P(ast::GenericArgs::Parenthesized(ast::ParenthesizedArgs {
|
||||
span: args_lo.to(self.prev_token.span),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue