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

@ -2284,8 +2284,8 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
}
}
}
ty::RawPtr(tnm) => {
match tnm.mutbl {
ty::RawPtr(_, mutbl) => {
match mutbl {
// `*const` raw pointers are not mutable
hir::Mutability::Not => Err(place),
// `*mut` raw pointers are always mutable, regardless of