1
Fork 0

Make RawPtr take Ty and Mutbl separately

This commit is contained in:
Michael Goulet 2024-03-21 17:33:10 -04:00
parent ff0c31e6b9
commit 7be0dbe772
36 changed files with 111 additions and 112 deletions

View file

@ -2477,7 +2477,7 @@ impl<'tcx> LateLintPass<'tcx> for InvalidValue {
Adt(..) if ty.is_box() => Some("`Box` must be non-null".into()),
FnPtr(..) => Some("function pointers must be non-null".into()),
Never => Some("the `!` type has no valid value".into()),
RawPtr(tm) if matches!(tm.ty.kind(), Dynamic(..)) =>
RawPtr(ty, _) if matches!(ty.kind(), Dynamic(..)) =>
// raw ptr to dyn Trait
{
Some("the vtable of a wide raw pointer must be non-null".into())