@@ -1470,15 +1470,12 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
1470
1470
match element_ty2. kind ( ) {
1471
1471
ty:: Int ( _) => ( ) ,
1472
1472
_ => {
1473
- require ! (
1474
- false ,
1475
- InvalidMonomorphization :: ThirdArgElementType {
1476
- span,
1477
- name,
1478
- expected_element: element_ty2,
1479
- third_arg: arg_tys[ 2 ]
1480
- }
1481
- ) ;
1473
+ return_error ! ( InvalidMonomorphization :: ThirdArgElementType {
1474
+ span,
1475
+ name,
1476
+ expected_element: element_ty2,
1477
+ third_arg: arg_tys[ 2 ]
1478
+ } ) ;
1482
1479
}
1483
1480
}
1484
1481
@@ -1590,15 +1587,12 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
1590
1587
match element_ty2. kind ( ) {
1591
1588
ty:: Int ( _) => ( ) ,
1592
1589
_ => {
1593
- require ! (
1594
- false ,
1595
- InvalidMonomorphization :: ThirdArgElementType {
1596
- span,
1597
- name,
1598
- expected_element: element_ty2,
1599
- third_arg: arg_tys[ 2 ]
1600
- }
1601
- ) ;
1590
+ return_error ! ( InvalidMonomorphization :: ThirdArgElementType {
1591
+ span,
1592
+ name,
1593
+ expected_element: element_ty2,
1594
+ third_arg: arg_tys[ 2 ]
1595
+ } ) ;
1602
1596
}
1603
1597
}
1604
1598
@@ -1989,17 +1983,14 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
1989
1983
}
1990
1984
_ => { /* Unsupported. Fallthrough. */ }
1991
1985
}
1992
- require ! (
1993
- false ,
1994
- InvalidMonomorphization :: UnsupportedCast {
1995
- span,
1996
- name,
1997
- in_ty,
1998
- in_elem,
1999
- ret_ty,
2000
- out_elem
2001
- }
2002
- ) ;
1986
+ return_error ! ( InvalidMonomorphization :: UnsupportedCast {
1987
+ span,
1988
+ name,
1989
+ in_ty,
1990
+ in_elem,
1991
+ ret_ty,
1992
+ out_elem
1993
+ } ) ;
2003
1994
}
2004
1995
macro_rules! arith_binary {
2005
1996
( $( $name: ident: $( $( $p: ident) ,* => $call: ident) ,* ; ) * ) => {
@@ -2010,8 +2001,7 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
2010
2001
} ) *
2011
2002
_ => { } ,
2012
2003
}
2013
- require!(
2014
- false ,
2004
+ return_error!(
2015
2005
InvalidMonomorphization :: UnsupportedOperation { span, name, in_ty, in_elem }
2016
2006
) ;
2017
2007
} ) *
@@ -2041,8 +2031,7 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
2041
2031
} ) *
2042
2032
_ => { } ,
2043
2033
}
2044
- require!(
2045
- false ,
2034
+ return_error!(
2046
2035
InvalidMonomorphization :: UnsupportedOperation { span, name, in_ty, in_elem }
2047
2036
) ;
2048
2037
} ) *
0 commit comments