about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc_typeck/astconv.rs4
-rw-r--r--src/librustc_typeck/check/mod.rs14
-rw-r--r--src/librustc_typeck/check/writeback.rs2
3 files changed, 10 insertions, 10 deletions
diff --git a/src/librustc_typeck/astconv.rs b/src/librustc_typeck/astconv.rs
index 58f4d3f1bc0..22393a7a291 100644
--- a/src/librustc_typeck/astconv.rs
+++ b/src/librustc_typeck/astconv.rs
@@ -1160,12 +1160,12 @@ pub fn ast_ty_to_ty<'tcx>(
                                                    using the syntax `<Type \
                                                    as {}>::{}`",
                                                   path_str,
-                                                  token::get_ident(
+                                                  &token::get_ident(
                                                       path.segments
                                                           .last()
                                                           .unwrap()
                                                           .identifier)
-                                                  .get());
+                                                  []);
                         this.tcx().types.err
                     }
                     def::DefAssociatedPath(provenance, assoc_ident) => {
diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs
index fb05450373f..5b89954c586 100644
--- a/src/librustc_typeck/check/mod.rs
+++ b/src/librustc_typeck/check/mod.rs
@@ -805,7 +805,7 @@ fn check_trait_on_unimplemented<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
         a.check_name("rustc_on_unimplemented")
     }) {
         if let Some(ref istring) = attr.value_str() {
-            let parser = Parser::new(istring.get());
+            let parser = Parser::new(&istring[]);
             let types = &*generics.ty_params;
             for token in parser {
                 match token {
@@ -3104,7 +3104,7 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
                                  tcx : &ty::ctxt<'tcx>,
                                  skip : Vec<&str>) {
         let ident = token::get_ident(field.node);
-        let name = ident.get();
+        let name = &ident[];
         // only find fits with at least one matching letter
         let mut best_dist = name.len();
         let fields = ty::lookup_struct_fields(tcx, id);
@@ -3286,7 +3286,7 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
                     let (_, seen) = class_field_map[name];
                     if !seen {
                         missing_fields.push(
-                            format!("`{}`", token::get_name(name).get()))
+                            format!("`{}`", &token::get_name(name)[]))
                     }
                 }
 
@@ -5223,8 +5223,8 @@ pub fn check_intrinsic_type(ccx: &CrateCtxt, it: &ast::ForeignItem) {
 
     let tcx = ccx.tcx;
     let name = token::get_ident(it.ident);
-    let (n_tps, inputs, output) = if name.get().starts_with("atomic_") {
-        let split : Vec<&str> = name.get().split('_').collect();
+    let (n_tps, inputs, output) = if name.starts_with("atomic_") {
+        let split : Vec<&str> = name.split('_').collect();
         assert!(split.len() >= 2, "Atomic intrinsic not correct format");
 
         //We only care about the operation here
@@ -5253,10 +5253,10 @@ pub fn check_intrinsic_type(ccx: &CrateCtxt, it: &ast::ForeignItem) {
             }
         };
         (n_tps, inputs, ty::FnConverging(output))
-    } else if name.get() == "abort" || name.get() == "unreachable" {
+    } else if &name[] == "abort" || &name[] == "unreachable" {
         (0, Vec::new(), ty::FnDiverging)
     } else {
-        let (n_tps, inputs, output) = match name.get() {
+        let (n_tps, inputs, output) = match &name[] {
             "breakpoint" => (0, Vec::new(), ty::mk_nil(tcx)),
             "size_of" |
             "pref_align_of" | "min_align_of" => (1, Vec::new(), ccx.tcx.types.uint),
diff --git a/src/librustc_typeck/check/writeback.rs b/src/librustc_typeck/check/writeback.rs
index f047a36c560..fca40df7aaa 100644
--- a/src/librustc_typeck/check/writeback.rs
+++ b/src/librustc_typeck/check/writeback.rs
@@ -405,7 +405,7 @@ impl<'cx, 'tcx> Resolver<'cx, 'tcx> {
                     let span = self.reason.span(self.tcx);
                     span_err!(self.tcx.sess, span, E0104,
                         "cannot resolve lifetime for captured variable `{}`: {}",
-                        ty::local_var_name_str(self.tcx, upvar_id.var_id).get().to_string(),
+                        ty::local_var_name_str(self.tcx, upvar_id.var_id).to_string(),
                         infer::fixup_err_to_string(e));
                 }