Open shao-hua-li opened 2 weeks ago
Bisected to https://github.com/rust-lang/rust/commit/1d68e6dd1deef26c5aeb91aee554edbee8b6d5e2, @workingjubilee
Why do you think this is a regression? Code that didn't compile will now compile, and that was the point of the change here.
@shao-hua-li
Intel and AMD CPUs have 5-level paging:
Intel 5-level paging, referred to simply as 5-level paging in Intel documents, is a processor extension for the x86-64 line of processors.[1]: 11 It extends the size of virtual addresses from 48 bits to 57 bits by adding an additional level to x86-64's multilevel page tables, increasing the addressable virtual memory from 256 TB to 128 PB. The extension was first implemented in the Ice Lake processors.[2]
It will soon be enabled unconditionally for Linux on x86-64. And that makes these types valid in a raw, mechanical sense. Perhaps an argument can be made for bounding on a 56 bit address space, given AArch64's TBI, Intel's LAM, and AMD's UAI.
Hmm.
cc @mrkajetanp @dheaton-arm I know you have been working on related stuff using pointer authentication and so on. These are absurd types, so our support for them is mostly only theoretical, anyways.
Code
I tried this code:
I expected to see this happen: rustc rejects the code
Instead, this happened: rustc-nightly accepts it.
Version it worked on
It most recently worked on: Rust 1.82
Version with regression