diff options
Diffstat (limited to 'src/librustc')
| -rw-r--r-- | src/librustc/ty/cast.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/librustc/ty/cast.rs b/src/librustc/ty/cast.rs index c0861abb774..ab82f28c8bf 100644 --- a/src/librustc/ty/cast.rs +++ b/src/librustc/ty/cast.rs @@ -58,6 +58,8 @@ pub enum CastKind { } impl<'tcx> CastTy<'tcx> { + /// Returns `Some` for integral/pointer casts. + /// casts like unsizing casts will return `None` pub fn from_ty(t: Ty<'tcx>) -> Option<CastTy<'tcx>> { match t.sty { ty::Bool => Some(CastTy::Int(IntTy::Bool)), |
