use rustc_hir::definitions::DefPathData;
use rustc_span::hygiene::ExpnId;
use rustc_span::source_map::{respan, DesugaringKind, Span, Spanned};
-use rustc_span::symbol::{sym, Ident, Symbol};
+use rustc_span::symbol::{sym, Ident};
use rustc_span::DUMMY_SP;
impl<'hir> LoweringContext<'_, 'hir> {
};
let fields = self.arena.alloc_from_iter(
- e1.iter().map(|e| ("start", e)).chain(e2.iter().map(|e| ("end", e))).map(|(s, e)| {
- let expr = self.lower_expr(&e);
- let ident = Ident::new(Symbol::intern(s), self.lower_span(e.span));
- self.expr_field(ident, expr, e.span)
- }),
+ e1.iter().map(|e| (sym::start, e)).chain(e2.iter().map(|e| (sym::end, e))).map(
+ |(s, e)| {
+ let expr = self.lower_expr(&e);
+ let ident = Ident::new(s, self.lower_span(e.span));
+ self.expr_field(ident, expr, e.span)
+ },
+ ),
);
hir::ExprKind::Struct(
use rustc_middle::ty::subst::{GenericArg, GenericArgKind};
use rustc_middle::ty::{self, Const, DefIdTree, InferConst, Ty, TyCtxt, TypeFoldable, TypeFolder};
use rustc_span::symbol::kw;
-use rustc_span::Span;
+use rustc_span::{sym, Span};
use std::borrow::Cow;
struct FindHirNodeVisitor<'a, 'tcx> {
| ty::Opaque(..)
| ty::Projection(_)
| ty::Never => t.super_fold_with(self),
- ty::Array(ty, c) => self
- .tcx()
- .mk_ty(ty::Array(self.fold_ty(ty), self.replace_infers(c, 0, Symbol::intern("N")))),
+ ty::Array(ty, c) => {
+ self.tcx().mk_ty(ty::Array(self.fold_ty(ty), self.replace_infers(c, 0, sym::N)))
+ }
// We don't want to hide type params that haven't been resolved yet.
// This would be the type that will be written out with the type param
// name in the output.
LinkedList,
LintPass,
Mutex,
+ N,
None,
Ok,
Option,
array,
arrays,
as_ptr,
+ as_ref,
as_str,
asm,
asm_const,
enable,
enclosing_scope,
encode,
+ end,
env,
eq,
ermsb_target_feature,
use rustc_middle::ty::{self, DefIdTree, ToPredicate, Ty, TyCtxt, TypeFoldable};
use rustc_span::lev_distance;
use rustc_span::symbol::{kw, sym, Ident};
-use rustc_span::{source_map, FileName, MultiSpan, Span, Symbol};
+use rustc_span::{source_map, FileName, MultiSpan, Span};
use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt;
use rustc_trait_selection::traits::{
FulfillmentError, Obligation, ObligationCause, ObligationCauseCode,
// Explicitly ignore the `Pin::as_ref()` method as `Pin` does not
// implement the `AsRef` trait.
let skip = skippable.contains(&did)
- || (("Pin::new" == *pre)
- && (Symbol::intern("as_ref") == item_name.name));
+ || (("Pin::new" == *pre) && (sym::as_ref == item_name.name));
// Make sure the method is defined for the *actual* receiver: we don't
// want to treat `Box<Self>` as a receiver if it only works because of
// an autoderef to `&self`