File tree Expand file tree Collapse file tree 5 files changed +25
-36
lines changed Expand file tree Collapse file tree 5 files changed +25
-36
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: 62f1d68439dcfd509eaca29887afa97f22938373
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
- refs/heads/snap-stage3: ff22e47c1915d6cdc545deb341c83d877a8825e6
4
+ refs/heads/snap-stage3: 5973b0c4ad26729aa1379b98317479f61cd0d87c
5
5
refs/heads/try: db814977d07bd798feb24f6b74c00800ef458a13
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
Original file line number Diff line number Diff line change @@ -1040,23 +1040,12 @@ pub fn ty_of_foreign_fn_decl(ccx: &CrateCtxt,
1040
1040
ast_generics : & ast:: Generics ,
1041
1041
abis : AbiSet )
1042
1042
-> ty:: ty_param_bounds_and_ty {
1043
-
1044
- for i in decl. inputs . iter ( ) {
1045
- match ( * i) . pat . node {
1046
- ast:: PatIdent ( _, _, _) => ( ) ,
1047
- ast:: PatWild => ( ) ,
1048
- _ => ccx. tcx . sess . span_err ( ( * i) . pat . span ,
1049
- "patterns aren't allowed in foreign function declarations" )
1050
- }
1051
- }
1052
-
1053
1043
let ty_generics = ty_generics ( ccx, ast_generics, 0 ) ;
1054
1044
let rb = BindingRscope :: new ( def_id. node ) ;
1055
1045
let input_tys = decl. inputs
1056
1046
. iter ( )
1057
1047
. map ( |a| ty_of_arg ( ccx, & rb, a, None ) )
1058
1048
. collect ( ) ;
1059
-
1060
1049
let output_ty = ast_ty_to_ty ( ccx, & rb, decl. output ) ;
1061
1050
1062
1051
let t_fn = ty:: mk_bare_fn (
Original file line number Diff line number Diff line change @@ -866,6 +866,18 @@ mod tests {
866
866
use num:: * ;
867
867
use num;
868
868
869
+ #[ test]
870
+ fn test_min_nan ( ) {
871
+ assert_eq ! ( NAN . min( 2.0 ) , 2.0 ) ;
872
+ assert_eq ! ( 2.0f32 . min( NAN ) , 2.0 ) ;
873
+ }
874
+
875
+ #[ test]
876
+ fn test_max_nan ( ) {
877
+ assert_eq ! ( NAN . max( 2.0 ) , 2.0 ) ;
878
+ assert_eq ! ( 2.0f32 . max( NAN ) , 2.0 ) ;
879
+ }
880
+
869
881
#[ test]
870
882
fn test_num ( ) {
871
883
num:: test_num ( 10f32 , 2f32 ) ;
Original file line number Diff line number Diff line change @@ -865,6 +865,18 @@ mod tests {
865
865
use num:: * ;
866
866
use num;
867
867
868
+ #[ test]
869
+ fn test_min_nan ( ) {
870
+ assert_eq ! ( NAN . min( 2.0 ) , 2.0 ) ;
871
+ assert_eq ! ( 2.0f64 . min( NAN ) , 2.0 ) ;
872
+ }
873
+
874
+ #[ test]
875
+ fn test_max_nan ( ) {
876
+ assert_eq ! ( NAN . max( 2.0 ) , 2.0 ) ;
877
+ assert_eq ! ( 2.0f64 . max( NAN ) , 2.0 ) ;
878
+ }
879
+
868
880
#[ test]
869
881
fn test_num ( ) {
870
882
num:: test_num ( 10f64 , 2f64 ) ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments