Skip to content

Commit 0555353

Browse files
committed
tidy fixes
1 parent fafe478 commit 0555353

File tree

1 file changed

+9
-10
lines changed
  • compiler/rustc_middle/src/ty

1 file changed

+9
-10
lines changed

compiler/rustc_middle/src/ty/sty.rs

+9-10
Original file line numberDiff line numberDiff line change
@@ -1284,7 +1284,7 @@ pub struct FnSig<'tcx> {
12841284
pub inputs_and_output: &'tcx List<Ty<'tcx>>,
12851285
/// Indicates if a function is variadic or not
12861286
pub c_variadic: bool,
1287-
/// Indicates if a function is safe or unsafe
1287+
/// Indicates if a function is safe or unsafe
12881288
pub unsafety: hir::Unsafety,
12891289
/// The ABI of this function
12901290
pub abi: abi::Abi,
@@ -1326,35 +1326,35 @@ impl<'tcx> PolyFnSig<'tcx> {
13261326
pub fn inputs(&self) -> Binder<'tcx, &'tcx [Ty<'tcx>]> {
13271327
self.map_bound_ref_unchecked(|fn_sig| fn_sig.inputs())
13281328
}
1329-
1329+
13301330
/// Returns a [`Binder`] containing the `index`th input of this signature.
13311331
#[track_caller]
13321332
#[inline]
13331333
pub fn input(&self, index: usize) -> ty::Binder<'tcx, Ty<'tcx>> {
13341334
self.map_bound_ref(|fn_sig| fn_sig.inputs()[index])
13351335
}
1336-
1336+
13371337
/// Returns a [`Binder`] containing the inputs and outputs of this signature.
13381338
pub fn inputs_and_output(&self) -> ty::Binder<'tcx, &'tcx List<Ty<'tcx>>> {
13391339
self.map_bound_ref(|fn_sig| fn_sig.inputs_and_output)
13401340
}
1341-
1341+
13421342
/// Returns a [`Binder`] containing the return type this signature.
13431343
#[inline]
13441344
pub fn output(&self) -> ty::Binder<'tcx, Ty<'tcx>> {
13451345
self.map_bound_ref(|fn_sig| fn_sig.output())
13461346
}
1347-
1347+
13481348
/// Checks if a function is variadic(accepts a variable number of arguments).
13491349
pub fn c_variadic(&self) -> bool {
13501350
self.skip_binder().c_variadic
13511351
}
1352-
1352+
13531353
/// Returns information about the safety of this function.
13541354
pub fn unsafety(&self) -> hir::Unsafety {
13551355
self.skip_binder().unsafety
13561356
}
1357-
1357+
13581358
/// Retunrs the ABI of this function
13591359
pub fn abi(&self) -> abi::Abi {
13601360
self.skip_binder().abi
@@ -1442,7 +1442,6 @@ impl From<BoundVar> for BoundTy {
14421442

14431443
/// Constructors for `Ty`
14441444
impl<'tcx> Ty<'tcx> {
1445-
14461445
/// Avoid using this in favour of more specific `new_*` methods, where possible.
14471446
/// The more specific methods will often optimize their creation.
14481447
#[allow(rustc::usage_of_ty_tykind)]
@@ -1505,13 +1504,13 @@ impl<'tcx> Ty<'tcx> {
15051504
.copied()
15061505
.unwrap_or_else(|| Ty::new_infer(tcx, ty::FreshFloatTy(n)))
15071506
}
1508-
1507+
15091508
/// Creates a new [`Ty`] representing a parameter, with index `index` and name `name`.
15101509
#[inline]
15111510
pub fn new_param(tcx: TyCtxt<'tcx>, index: u32, name: Symbol) -> Ty<'tcx> {
15121511
tcx.mk_ty_from_kind(Param(ParamTy { index, name }))
15131512
}
1514-
1513+
15151514
/// Creates an new [`Ty`] representing a bound type variable, with debruijn index `index` and bound type `bound_ty`.
15161515
#[inline]
15171516
pub fn new_bound(

0 commit comments

Comments
 (0)