about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRyan1729 <Ryan1729@gmail.com>2020-08-04 16:45:47 -0600
committerRyan1729 <Ryan1729@gmail.com>2020-08-06 04:24:25 -0600
commit6fdd1dbe033557cb64c8e0afb5cf675299990659 (patch)
treea0b8415d8f73a4d46e5fa08f5f2ab14eb5684860
parentab93133e83048f0b583e5ce3ff3794f4e1d425aa (diff)
downloadrust-6fdd1dbe033557cb64c8e0afb5cf675299990659.tar.gz
rust-6fdd1dbe033557cb64c8e0afb5cf675299990659.zip
add description to assert
-rw-r--r--src/tools/clippy/clippy_lints/src/transmute.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tools/clippy/clippy_lints/src/transmute.rs b/src/tools/clippy/clippy_lints/src/transmute.rs
index b6747c73f70..ea14f2829ea 100644
--- a/src/tools/clippy/clippy_lints/src/transmute.rs
+++ b/src/tools/clippy/clippy_lints/src/transmute.rs
@@ -723,7 +723,10 @@ fn check_cast<'tcx>(cx: &LateContext<'tcx>, e: &'tcx Expr<'_>, from_ty: Ty<'tcx>
         );
 
         // If we already have errors, we can't be sure we can pointer cast.
-        assert!(!fn_ctxt.errors_reported_since_creation());
+        assert!(
+            !fn_ctxt.errors_reported_since_creation(), 
+            "Newly created FnCtxt contained errors"
+        );
 
         if let Ok(check) = CastCheck::new(
             &fn_ctxt,