@@ -805,7 +805,7 @@ fn check_trait_on_unimplemented<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
805
805
a. check_name ( "rustc_on_unimplemented" )
806
806
} ) {
807
807
if let Some ( ref istring) = attr. value_str ( ) {
808
- let parser = Parser :: new ( istring. get ( ) ) ;
808
+ let parser = Parser :: new ( & istring[ ] ) ;
809
809
let types = & * generics. ty_params ;
810
810
for token in parser {
811
811
match token {
@@ -3104,7 +3104,7 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
3104
3104
tcx : & ty:: ctxt < ' tcx > ,
3105
3105
skip : Vec < & str > ) {
3106
3106
let ident = token:: get_ident ( field. node ) ;
3107
- let name = ident. get ( ) ;
3107
+ let name = & ident[ ] ;
3108
3108
// only find fits with at least one matching letter
3109
3109
let mut best_dist = name. len ( ) ;
3110
3110
let fields = ty:: lookup_struct_fields ( tcx, id) ;
@@ -3286,7 +3286,7 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
3286
3286
let ( _, seen) = class_field_map[ name] ;
3287
3287
if !seen {
3288
3288
missing_fields. push (
3289
- format ! ( "`{}`" , token:: get_name( name) . get ( ) ) )
3289
+ format ! ( "`{}`" , & token:: get_name( name) [ ] ) )
3290
3290
}
3291
3291
}
3292
3292
@@ -5223,8 +5223,8 @@ pub fn check_intrinsic_type(ccx: &CrateCtxt, it: &ast::ForeignItem) {
5223
5223
5224
5224
let tcx = ccx. tcx ;
5225
5225
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 ( ) ;
5228
5228
assert ! ( split. len( ) >= 2 , "Atomic intrinsic not correct format" ) ;
5229
5229
5230
5230
//We only care about the operation here
@@ -5253,10 +5253,10 @@ pub fn check_intrinsic_type(ccx: &CrateCtxt, it: &ast::ForeignItem) {
5253
5253
}
5254
5254
} ;
5255
5255
( n_tps, inputs, ty:: FnConverging ( output) )
5256
- } else if name. get ( ) == "abort" || name. get ( ) == "unreachable" {
5256
+ } else if & name[ ] == "abort" || & name[ ] == "unreachable" {
5257
5257
( 0 , Vec :: new ( ) , ty:: FnDiverging )
5258
5258
} else {
5259
- let ( n_tps, inputs, output) = match name. get ( ) {
5259
+ let ( n_tps, inputs, output) = match & name[ ] {
5260
5260
"breakpoint" => ( 0 , Vec :: new ( ) , ty:: mk_nil ( tcx) ) ,
5261
5261
"size_of" |
5262
5262
"pref_align_of" | "min_align_of" => ( 1 , Vec :: new ( ) , ccx. tcx . types . uint ) ,
0 commit comments