compiler: Lower fn call arg spans down to MIR

To enable improved accuracy of diagnostics in upcoming commits.
This commit is contained in:
Martin Nordholts
2024-01-12 08:21:42 +01:00
parent 924ea05103
commit 16ba56c242
47 changed files with 221 additions and 170 deletions

View File

@@ -402,7 +402,7 @@ impl<'a, 'tcx> Visitor<'tcx> for CfgChecker<'a, 'tcx> {
);
}
for arg in args {
if let Operand::Move(place) = arg {
if let Operand::Move(place) = &arg.node {
if is_within_packed(self.tcx, &self.body.local_decls, *place).is_some() {
// This is bad! The callee will expect the memory to be aligned.
self.fail(