-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
use semantic equality for const param type equality assertion #107940
use semantic equality for const param type equality assertion #107940
Conversation
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit a85b010 with merge a790aca386d508c3046fdca16a1968508f06510b... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couple of nits
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (a790aca386d508c3046fdca16a1968508f06510b): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. |
wtf??? that benchmark doesnt even relate any consts... theres only like THREE calls to @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 0c3a53bc3201f0f0a646fe49ea896f2441c687da with merge 17492353baad22ea6bad6e49df924147f25b83ad... |
This comment has been minimized.
This comment has been minimized.
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (17492353baad22ea6bad6e49df924147f25b83ad): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. |
0c3a53b
to
57ad73a
Compare
@bors r+ |
There are no calls to that new query in the regressions below -- I'm pretty sure it's still noise.. |
☀️ Test successful - checks-actions |
Finished benchmarking commit (068161e): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
|
Relatively small significance threshold in a single benchmark -- likely a real regression, but not worth intense scrutiny. Marking as triaged. |
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]>
Fixes #107898
See added test for what caused this ICE
The current in assertion in
relate.rs
is rather inadequate when keeping in mind future expansions to const generics:==
instead ofinfcx.at(..).eq
adt_const_params
to craft a situation where the const param type is not wf causingnormalize_erasing_regions
tobug!
when we would have emitted a diagnostic.This impl feels pretty Not Great to me although i am not sure what a better idea would be.
relate.rs
orcombine.rs
have access to trait solving machinery (without evaluating nested obligations this assert will become far less useful under lazy norm, which consts are already doing)relate.rs
does not have access to canonicalization machinery which is necessary in order to have types potentially containing infer vars in query arguments.We could possible add a method to
TypeRelation
to do this assertion rather than a query but to avoid implementing the same logic over and over we'd probably end up with the logic in a free function somewhere inrustc_trait_selection
anyway so I don't think that would be much better.We could also just remove this assertion, it should not actually be necessary for it to be present. It has caught some bugs in the past though so if possible I would like to keep it.
r? @compiler-errors