diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index b9713e844d6..61fc856764c 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -2697,16 +2697,12 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> { fn resolve_place_op(&self, op: PlaceOp, is_mut: bool) -> (Option, ast::Ident) { let (tr, name) = match (op, is_mut) { - (PlaceOp::Deref, false) => - (self.tcx.lang_items().deref_trait(), "deref"), - (PlaceOp::Deref, true) => - (self.tcx.lang_items().deref_mut_trait(), "deref_mut"), - (PlaceOp::Index, false) => - (self.tcx.lang_items().index_trait(), "index"), - (PlaceOp::Index, true) => - (self.tcx.lang_items().index_mut_trait(), "index_mut"), + (PlaceOp::Deref, false) => (self.tcx.lang_items().deref_trait(), sym::deref), + (PlaceOp::Deref, true) => (self.tcx.lang_items().deref_mut_trait(), sym::deref_mut), + (PlaceOp::Index, false) => (self.tcx.lang_items().index_trait(), sym::index), + (PlaceOp::Index, true) => (self.tcx.lang_items().index_mut_trait(), sym::index_mut), }; - (tr, ast::Ident::from_str(name)) + (tr, ast::Ident::with_empty_ctxt(name)) } fn try_overloaded_place_op(&self, diff --git a/src/libsyntax_pos/symbol.rs b/src/libsyntax_pos/symbol.rs index 26422e891c5..3296de7b927 100644 --- a/src/libsyntax_pos/symbol.rs +++ b/src/libsyntax_pos/symbol.rs @@ -204,6 +204,8 @@ symbols! { default_type_params, deny, deprecated, + deref, + deref_mut, derive, doc, doc_alias, @@ -291,6 +293,8 @@ symbols! { impl_header_lifetime_elision, impl_trait_in_bindings, import_shadowing, + index, + index_mut, in_band_lifetimes, include, inclusive_range_syntax,