about summary refs log tree commit diff
path: root/src/librustc/ty
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-10-19 09:29:48 +0000
committerbors <bors@rust-lang.org>2018-10-19 09:29:48 +0000
commit74ff7dcb1388e60a613cd6050bcd372a3cc4998b (patch)
tree4b035c9be0ee57066b2427b5d98794887b4f6e75 /src/librustc/ty
parentdbab381da1a46a18e46a04a61156aec40c59a4f6 (diff)
parent0724efd9a1aac9cf4620795786fb8e896fbb17b3 (diff)
downloadrust-74ff7dcb1388e60a613cd6050bcd372a3cc4998b.tar.gz
rust-74ff7dcb1388e60a613cd6050bcd372a3cc4998b.zip
Auto merge of #55194 - kennytm:rollup, r=kennytm
Rollup of 7 pull requests

Successful merges:

 - #54300 (Updated RELEASES.md for 1.30.0)
 - #55013 ([NLL] Propagate bounds from generators)
 - #55071 (Fix ICE and report a human readable error)
 - #55144 (Cleanup resolve)
 - #55166 (Don't warn about parentheses on `match (return)`)
 - #55169 (Add a `copysign` function to f32 and f64)
 - #55178 (Stabilize slice::chunks_exact(), chunks_exact_mut(), rchunks(), rchunks_mut(), rchunks_exact(), rchunks_exact_mut())
Diffstat (limited to 'src/librustc/ty')
-rw-r--r--src/librustc/ty/cast.rs2
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)),