@@ -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 ) ,
0 commit comments