Skip to content

Commit 4b6632d

Browse files
librustc_typeck has been updated
1 parent 0f09021 commit 4b6632d

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/librustc_typeck/astconv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,12 +1160,12 @@ pub fn ast_ty_to_ty<'tcx>(
11601160
using the syntax `<Type \
11611161
as {}>::{}`",
11621162
path_str,
1163-
token::get_ident(
1163+
&token::get_ident(
11641164
path.segments
11651165
.last()
11661166
.unwrap()
11671167
.identifier)
1168-
.get());
1168+
[]);
11691169
this.tcx().types.err
11701170
}
11711171
def::DefAssociatedPath(provenance, assoc_ident) => {

src/librustc_typeck/check/mod.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ fn check_trait_on_unimplemented<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
805805
a.check_name("rustc_on_unimplemented")
806806
}) {
807807
if let Some(ref istring) = attr.value_str() {
808-
let parser = Parser::new(istring.get());
808+
let parser = Parser::new(&istring[]);
809809
let types = &*generics.ty_params;
810810
for token in parser {
811811
match token {
@@ -3104,7 +3104,7 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
31043104
tcx : &ty::ctxt<'tcx>,
31053105
skip : Vec<&str>) {
31063106
let ident = token::get_ident(field.node);
3107-
let name = ident.get();
3107+
let name = &ident[];
31083108
// only find fits with at least one matching letter
31093109
let mut best_dist = name.len();
31103110
let fields = ty::lookup_struct_fields(tcx, id);
@@ -3286,7 +3286,7 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
32863286
let (_, seen) = class_field_map[name];
32873287
if !seen {
32883288
missing_fields.push(
3289-
format!("`{}`", token::get_name(name).get()))
3289+
format!("`{}`", &token::get_name(name)[]))
32903290
}
32913291
}
32923292

@@ -5223,8 +5223,8 @@ pub fn check_intrinsic_type(ccx: &CrateCtxt, it: &ast::ForeignItem) {
52235223

52245224
let tcx = ccx.tcx;
52255225
let name = token::get_ident(it.ident);
5226-
let (n_tps, inputs, output) = if name.get().starts_with("atomic_") {
5227-
let split : Vec<&str> = name.get().split('_').collect();
5226+
let (n_tps, inputs, output) = if name.starts_with("atomic_") {
5227+
let split : Vec<&str> = name.split('_').collect();
52285228
assert!(split.len() >= 2, "Atomic intrinsic not correct format");
52295229

52305230
//We only care about the operation here
@@ -5253,10 +5253,10 @@ pub fn check_intrinsic_type(ccx: &CrateCtxt, it: &ast::ForeignItem) {
52535253
}
52545254
};
52555255
(n_tps, inputs, ty::FnConverging(output))
5256-
} else if name.get() == "abort" || name.get() == "unreachable" {
5256+
} else if &name[] == "abort" || &name[] == "unreachable" {
52575257
(0, Vec::new(), ty::FnDiverging)
52585258
} else {
5259-
let (n_tps, inputs, output) = match name.get() {
5259+
let (n_tps, inputs, output) = match &name[] {
52605260
"breakpoint" => (0, Vec::new(), ty::mk_nil(tcx)),
52615261
"size_of" |
52625262
"pref_align_of" | "min_align_of" => (1, Vec::new(), ccx.tcx.types.uint),

src/librustc_typeck/check/writeback.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ impl<'cx, 'tcx> Resolver<'cx, 'tcx> {
405405
let span = self.reason.span(self.tcx);
406406
span_err!(self.tcx.sess, span, E0104,
407407
"cannot resolve lifetime for captured variable `{}`: {}",
408-
ty::local_var_name_str(self.tcx, upvar_id.var_id).get().to_string(),
408+
ty::local_var_name_str(self.tcx, upvar_id.var_id).to_string(),
409409
infer::fixup_err_to_string(e));
410410
}
411411

0 commit comments

Comments
 (0)