-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clarify semantics of ConstantIndex MIR projection #131285
Conversation
This PR changes MIR cc @oli-obk, @RalfJung, @JakobDegen, @davidtwco, @celinval, @vakaras This PR changes Stable MIR |
It's only meaningful use is in borrowck, where it's used to check conflict between two @bors r+ rollup |
What exactly needs to be true about the semantics of this for whatever borrowck is doing to be sound? If we can declare this field as being entirely irrelevant for the semantics, that'd surely make things a bit simpler, but then borrowck couldn't "trust" its value. |
When checking conflict between |
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#130555 ( Initial support for riscv32{e|em|emc}_unknown_none_elf) - rust-lang#131280 (Handle `rustc_interface` cases of `rustc::potential_query_instability` lint) - rust-lang#131281 (make Cell unstably const) - rust-lang#131285 (clarify semantics of ConstantIndex MIR projection) - rust-lang#131299 (fix typo in 'lang item with track_caller' message) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#131285 - RalfJung:mir-projection-sem, r=cjgillot clarify semantics of ConstantIndex MIR projection This documents what Miri does: https://github.com/rust-lang/rust/blob/c4ce8c114b06840c3521a189ee44958b713fb33a/compiler/rustc_const_eval/src/interpret/projection.rs#L272-L275 I am not sure what exactly the purpose of this `min_length` field is, TBH... but this seems like the most obvious meaning it could have?
This documents what Miri does:
rust/compiler/rustc_const_eval/src/interpret/projection.rs
Lines 272 to 275 in c4ce8c1
I am not sure what exactly the purpose of this
min_length
field is, TBH... but this seems like the most obvious meaning it could have?