Skip to content

Commit 6fdd1db

Browse files
committed
add description to assert
1 parent ab93133 commit 6fdd1db

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/tools/clippy/clippy_lints/src/transmute.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,10 @@ fn check_cast<'tcx>(cx: &LateContext<'tcx>, e: &'tcx Expr<'_>, from_ty: Ty<'tcx>
723723
);
724724

725725
// If we already have errors, we can't be sure we can pointer cast.
726-
assert!(!fn_ctxt.errors_reported_since_creation());
726+
assert!(
727+
!fn_ctxt.errors_reported_since_creation(),
728+
"Newly created FnCtxt contained errors"
729+
);
727730

728731
if let Ok(check) = CastCheck::new(
729732
&fn_ctxt,

0 commit comments

Comments
 (0)