mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-17 17:33:07 +00:00
add description to assert
This commit is contained in:
parent
d38766ed96
commit
19f36bc2f3
@ -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.
|
// 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(
|
if let Ok(check) = CastCheck::new(
|
||||||
&fn_ctxt,
|
&fn_ctxt,
|
||||||
|
Loading…
Reference in New Issue
Block a user