Skip to content

Commit

Permalink
librustc_typeck has been updated
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Feb 6, 2015
1 parent 0f09021 commit 4b6632d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/librustc_typeck/astconv.rs
Expand Up @@ -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) => {
Expand Down
14 changes: 7 additions & 7 deletions src/librustc_typeck/check/mod.rs
Expand Up @@ -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 {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)[]))
}
}

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/writeback.rs
Expand Up @@ -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));
}

Expand Down

0 comments on commit 4b6632d

Please sign in to comment.