On Wed Nov 25, 2026 at 12:03 AM CET, Daniel Almeida wrote: > You're saying this is possible under the code you're proposing? Because at > first glance this looks like a shortening of 'iomem to 'a (from > DriverFile<'a>), which I assume the compiler would reject due to invariance?
Yes. A user VM can borrow &'a Mmu<'iomem>. The lifetime 'a bounds the borrow, while the invariant 'iomem stays unchanged. That's why Vm has separate borrow and resource lifetime parameters. The invariant parameter can e.g. be hidden existentially in the file-private data (or an abstraction for a collection of data associated with handles created by ioctls), as it is in Firmware.
