@@ -138,6 +138,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) {
138
138
let name_str = intrinsic_name. as_str ( ) ;
139
139
140
140
let bound_vars = tcx. mk_bound_variable_kinds ( & [
141
+ ty:: BoundVariableKind :: Region ( ty:: BrAnon ) ,
141
142
ty:: BoundVariableKind :: Region ( ty:: BrAnon ) ,
142
143
ty:: BoundVariableKind :: Region ( ty:: BrEnv ) ,
143
144
] ) ;
@@ -151,7 +152,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) {
151
152
let env_region = ty:: Region :: new_bound (
152
153
tcx,
153
154
ty:: INNERMOST ,
154
- ty:: BoundRegion { var : ty:: BoundVar :: from_u32 ( 1 ) , kind : ty:: BrEnv } ,
155
+ ty:: BoundRegion { var : ty:: BoundVar :: from_u32 ( 2 ) , kind : ty:: BrEnv } ,
155
156
) ;
156
157
let va_list_ty = tcx. type_of ( did) . instantiate ( tcx, & [ region. into ( ) ] ) ;
157
158
( Ty :: new_ref ( tcx, env_region, ty:: TypeAndMut { ty : va_list_ty, mutbl } ) , va_list_ty)
@@ -446,9 +447,12 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) {
446
447
447
448
sym:: raw_eq => {
448
449
let br = ty:: BoundRegion { var : ty:: BoundVar :: from_u32 ( 0 ) , kind : ty:: BrAnon } ;
449
- let param_ty =
450
+ let param_ty_lhs =
451
+ Ty :: new_imm_ref ( tcx, ty:: Region :: new_bound ( tcx, ty:: INNERMOST , br) , param ( 0 ) ) ;
452
+ let br = ty:: BoundRegion { var : ty:: BoundVar :: from_u32 ( 1 ) , kind : ty:: BrAnon } ;
453
+ let param_ty_rhs =
450
454
Ty :: new_imm_ref ( tcx, ty:: Region :: new_bound ( tcx, ty:: INNERMOST , br) , param ( 0 ) ) ;
451
- ( 1 , vec ! [ param_ty ; 2 ] , tcx. types . bool )
455
+ ( 1 , vec ! [ param_ty_lhs , param_ty_rhs ] , tcx. types . bool )
452
456
}
453
457
454
458
sym:: black_box => ( 1 , vec ! [ param( 0 ) ] , param ( 0 ) ) ,
0 commit comments