File tree Expand file tree Collapse file tree 3 files changed +13
-21
lines changed
branches/try2/src/librustc/middle Expand file tree Collapse file tree 3 files changed +13
-21
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
5
5
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
- refs/heads/try2: db9af1d505809c965e719bf4ad775ff984ee3da6
8
+ refs/heads/try2: abdbaa2e19dcf6859ae781bb9b44fed483181229
9
9
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change @@ -934,22 +934,17 @@ pub fn lltype_for_foreign_fn(ccx: &CrateContext, ty: ty::t) -> Type {
934
934
935
935
fn add_argument_attributes ( tys : & ForeignTypes ,
936
936
llfn : ValueRef ) {
937
- let mut i = 0 ;
938
-
939
- if tys. fn_ty . ret_ty . is_indirect ( ) {
940
- match tys. fn_ty . ret_ty . attr {
941
- Some ( attr) => {
942
- let llarg = get_param ( llfn, i) ;
943
- unsafe {
944
- llvm:: LLVMAddAttribute ( llarg, attr as c_uint ) ;
945
- }
946
- }
947
- None => { }
948
- }
937
+ let mut i = if tys. fn_ty . ret_ty . is_indirect ( ) { 1 } else { 0 } ;
949
938
950
- i += 1 ;
939
+ match tys. fn_ty . ret_ty . attr {
940
+ Some ( attr) => unsafe {
941
+ llvm:: LLVMAddFunctionAttribute ( llfn, i as c_uint , attr as u64 ) ;
942
+ } ,
943
+ None => { }
951
944
}
952
945
946
+ i += 1 ;
947
+
953
948
for & arg_ty in tys. fn_ty . arg_tys . iter ( ) {
954
949
if arg_ty. is_ignore ( ) {
955
950
continue ;
@@ -958,12 +953,9 @@ fn add_argument_attributes(tys: &ForeignTypes,
958
953
if arg_ty. pad . is_some ( ) { i += 1 ; }
959
954
960
955
match arg_ty. attr {
961
- Some ( attr) => {
962
- let llarg = get_param ( llfn, i) ;
963
- unsafe {
964
- llvm:: LLVMAddAttribute ( llarg, attr as c_uint ) ;
965
- }
966
- }
956
+ Some ( attr) => unsafe {
957
+ llvm:: LLVMAddFunctionAttribute ( llfn, i as c_uint , attr as u64 ) ;
958
+ } ,
967
959
None => ( )
968
960
}
969
961
Original file line number Diff line number Diff line change @@ -2651,7 +2651,7 @@ fn check_expr_with_unifier(fcx: &FnCtxt,
2651
2651
let error = if vst == ast:: ExprVstoreSlice {
2652
2652
"`&\" string\" ` has been removed; use `\" string\" ` instead"
2653
2653
} else {
2654
- "`box \" string\" ` has been removed; use `\" string\" .to_string()` instead"
2654
+ "`~ \" string\" ` has been removed; use `\" string\" .to_string()` instead"
2655
2655
} ;
2656
2656
tcx. sess . span_err ( expr. span , error) ;
2657
2657
ty:: mk_err ( )
You can’t perform that action at this time.
0 commit comments