-
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
super_relate_consts
ty
field equality assert doesnt support <T, const N: T>
#107898
Comments
I determined it was due to the above linked-from PR. |
Prior to this PR, the above code would emit the following warning instead of generating the ICE:
|
super_relate_consts
ty
field equality assert doesnt support <T, const N: T>
This is caused by the fact that |
Skip over all the nightlies from 2023-02-06 until 2023-02-15 as those ICE when trying to build kani with: ``` error: internal compiler error: cannot relate constants (Const { ty: fn() -> usize {std::mem::size_of::<[T; N]>}, kind: Value(Branch([])) }, Const { ty: fn() -> usize {std::mem::size_of::<[T; _]>}, kind: Value(Branch([])) }) of different types: fn() -> usize {std::mem::size_of::<[T; N]>} != fn() -> usize {std::mem::size_of::<[T; _]>} ``` This issue was reported upstream as rust-lang/rust#107898, and fixed in rust-lang/rust#107940, which isn't part of any of the above nightlies. Doing this multi-day update also requires addressing: Remove some superfluous type parameters from layout.rs rust-lang/rust#107163 Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838 s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029 Co-authored-by: Qinheping Hu <[email protected]>
Skip over all the nightlies from 2023-02-06 until 2023-02-15 as those ICE when trying to build kani with: ``` error: internal compiler error: cannot relate constants (Const { ty: fn() -> usize {std::mem::size_of::<[T; N]>}, kind: Value(Branch([])) }, Const { ty: fn() -> usize {std::mem::size_of::<[T; _]>}, kind: Value(Branch([])) }) of different types: fn() -> usize {std::mem::size_of::<[T; N]>} != fn() -> usize {std::mem::size_of::<[T; _]>} ``` This issue was reported upstream as rust-lang/rust#107898, and fixed in rust-lang/rust#107940, which isn't part of any of the above nightlies. Doing this multi-day update also requires addressing: Remove some superfluous type parameters from layout.rs rust-lang/rust#107163 Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838 s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029 Co-authored-by: Qinheping Hu <[email protected]>
Skip over all the nightlies from 2023-02-06 until 2023-02-15 as those ICE when trying to build kani with: ``` error: internal compiler error: cannot relate constants (Const { ty: fn() -> usize {std::mem::size_of::<[T; N]>}, kind: Value(Branch([])) }, Const { ty: fn() -> usize {std::mem::size_of::<[T; _]>}, kind: Value(Branch([])) }) of different types: fn() -> usize {std::mem::size_of::<[T; N]>} != fn() -> usize {std::mem::size_of::<[T; _]>} ``` This issue was reported upstream as rust-lang/rust#107898, and fixed in rust-lang/rust#107940, which isn't part of any of the above nightlies. Doing this multi-day update also requires addressing: Remove some superfluous type parameters from layout.rs rust-lang/rust#107163 Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838 s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029 Co-authored-by: Qinheping Hu <[email protected]>
Code
Meta
rustc --version --verbose
:Error output
Backtrace
This occurred in code different from the above but this is a minimal example that causes this failure. I believe I am disobeying some rules in the manner in which
T
is not bound in the underlying type of the trait. This bug appeared in my own code that worked with a previous nightly build. That code does bindT
into the underlying type and still fails. If I bind it in this example with the following changes:the error goes away. I will need to create a minimal example that produces an ICE closer to the failure in my own code but I was struggling to do this. This is at least one ICE of interest and perhaps the unbound
T
should itself be prevented. I'm not entirely sure. Worthy of note, the following also compiles fine:which omits all of the
generic_const_expr
stuff.The text was updated successfully, but these errors were encountered: