Skip to content

Commit d3cc598

Browse files
authored
Rollup merge of #81131 - pierwill:edit-rustc_middle-cast, r=varkor
Edit rustc_middle::ty::cast docs Link to RFC 401 and add missing punctuation.
2 parents 8f1716c + 34debb6 commit d3cc598

File tree

1 file changed

+6
-5
lines changed
  • compiler/rustc_middle/src/ty

1 file changed

+6
-5
lines changed

compiler/rustc_middle/src/ty/cast.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,16 @@ pub enum CastTy<'tcx> {
2222
/// Various types that are represented as ints and handled mostly
2323
/// in the same way, merged for easier matching.
2424
Int(IntTy),
25-
/// Floating-Point types
25+
/// Floating-point types.
2626
Float,
27-
/// Function Pointers
27+
/// Function pointers.
2828
FnPtr,
29-
/// Raw pointers
29+
/// Raw pointers.
3030
Ptr(ty::TypeAndMut<'tcx>),
3131
}
3232

33-
/// Cast Kind. See RFC 401 (or librustc_typeck/check/cast.rs)
33+
/// Cast Kind. See [RFC 401](https://rust-lang.github.io/rfcs/0401-coercions.html)
34+
/// (or librustc_typeck/check/cast.rs).
3435
#[derive(Copy, Clone, Debug, TyEncodable, TyDecodable, HashStable)]
3536
pub enum CastKind {
3637
CoercionCast,
@@ -48,7 +49,7 @@ pub enum CastKind {
4849

4950
impl<'tcx> CastTy<'tcx> {
5051
/// Returns `Some` for integral/pointer casts.
51-
/// casts like unsizing casts will return `None`
52+
/// Casts like unsizing casts will return `None`.
5253
pub fn from_ty(t: Ty<'tcx>) -> Option<CastTy<'tcx>> {
5354
match *t.kind() {
5455
ty::Bool => Some(CastTy::Int(IntTy::Bool)),

0 commit comments

Comments
 (0)