@@ -1284,7 +1284,7 @@ pub struct FnSig<'tcx> {
1284
1284
pub inputs_and_output : & ' tcx List < Ty < ' tcx > > ,
1285
1285
/// Indicates if a function is variadic or not
1286
1286
pub c_variadic : bool ,
1287
- /// Indicates if a function is safe or unsafe
1287
+ /// Indicates if a function is safe or unsafe
1288
1288
pub unsafety : hir:: Unsafety ,
1289
1289
/// The ABI of this function
1290
1290
pub abi : abi:: Abi ,
@@ -1326,35 +1326,35 @@ impl<'tcx> PolyFnSig<'tcx> {
1326
1326
pub fn inputs ( & self ) -> Binder < ' tcx , & ' tcx [ Ty < ' tcx > ] > {
1327
1327
self . map_bound_ref_unchecked ( |fn_sig| fn_sig. inputs ( ) )
1328
1328
}
1329
-
1329
+
1330
1330
/// Returns a [`Binder`] containing the `index`th input of this signature.
1331
1331
#[ track_caller]
1332
1332
#[ inline]
1333
1333
pub fn input ( & self , index : usize ) -> ty:: Binder < ' tcx , Ty < ' tcx > > {
1334
1334
self . map_bound_ref ( |fn_sig| fn_sig. inputs ( ) [ index] )
1335
1335
}
1336
-
1336
+
1337
1337
/// Returns a [`Binder`] containing the inputs and outputs of this signature.
1338
1338
pub fn inputs_and_output ( & self ) -> ty:: Binder < ' tcx , & ' tcx List < Ty < ' tcx > > > {
1339
1339
self . map_bound_ref ( |fn_sig| fn_sig. inputs_and_output )
1340
1340
}
1341
-
1341
+
1342
1342
/// Returns a [`Binder`] containing the return type this signature.
1343
1343
#[ inline]
1344
1344
pub fn output ( & self ) -> ty:: Binder < ' tcx , Ty < ' tcx > > {
1345
1345
self . map_bound_ref ( |fn_sig| fn_sig. output ( ) )
1346
1346
}
1347
-
1347
+
1348
1348
/// Checks if a function is variadic(accepts a variable number of arguments).
1349
1349
pub fn c_variadic ( & self ) -> bool {
1350
1350
self . skip_binder ( ) . c_variadic
1351
1351
}
1352
-
1352
+
1353
1353
/// Returns information about the safety of this function.
1354
1354
pub fn unsafety ( & self ) -> hir:: Unsafety {
1355
1355
self . skip_binder ( ) . unsafety
1356
1356
}
1357
-
1357
+
1358
1358
/// Retunrs the ABI of this function
1359
1359
pub fn abi ( & self ) -> abi:: Abi {
1360
1360
self . skip_binder ( ) . abi
@@ -1442,7 +1442,6 @@ impl From<BoundVar> for BoundTy {
1442
1442
1443
1443
/// Constructors for `Ty`
1444
1444
impl < ' tcx > Ty < ' tcx > {
1445
-
1446
1445
/// Avoid using this in favour of more specific `new_*` methods, where possible.
1447
1446
/// The more specific methods will often optimize their creation.
1448
1447
#[ allow( rustc:: usage_of_ty_tykind) ]
@@ -1505,13 +1504,13 @@ impl<'tcx> Ty<'tcx> {
1505
1504
. copied ( )
1506
1505
. unwrap_or_else ( || Ty :: new_infer ( tcx, ty:: FreshFloatTy ( n) ) )
1507
1506
}
1508
-
1507
+
1509
1508
/// Creates a new [`Ty`] representing a parameter, with index `index` and name `name`.
1510
1509
#[ inline]
1511
1510
pub fn new_param ( tcx : TyCtxt < ' tcx > , index : u32 , name : Symbol ) -> Ty < ' tcx > {
1512
1511
tcx. mk_ty_from_kind ( Param ( ParamTy { index, name } ) )
1513
1512
}
1514
-
1513
+
1515
1514
/// Creates an new [`Ty`] representing a bound type variable, with debruijn index `index` and bound type `bound_ty`.
1516
1515
#[ inline]
1517
1516
pub fn new_bound (
0 commit comments