diff options
| author | Ryan1729 <Ryan1729@gmail.com> | 2020-08-04 16:45:47 -0600 |
|---|---|---|
| committer | Ryan1729 <Ryan1729@gmail.com> | 2020-08-06 04:24:25 -0600 |
| commit | 6fdd1dbe033557cb64c8e0afb5cf675299990659 (patch) | |
| tree | a0b8415d8f73a4d46e5fa08f5f2ab14eb5684860 | |
| parent | ab93133e83048f0b583e5ce3ff3794f4e1d425aa (diff) | |
| download | rust-6fdd1dbe033557cb64c8e0afb5cf675299990659.tar.gz rust-6fdd1dbe033557cb64c8e0afb5cf675299990659.zip | |
add description to assert
| -rw-r--r-- | src/tools/clippy/clippy_lints/src/transmute.rs | 5 |
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, |
