-
Notifications
You must be signed in to change notification settings - Fork 145
Verus internals updates #2118
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
base: main
Are you sure you want to change the base?
Verus internals updates #2118
Conversation
… attributes where necessary
this fixes an error with --compile where rustc panics due to improper MIR resulting from improper use of intrinsics
|
I added some |
|
It looks like the failure of |
I'm just guessing, but this bit in the syntax macro seems like a plausible culprit: Previously this invoked a function on the arguments, which would add additional type constraints that presumably help type inference do a better job. |
|
if the body is unimplemented, it won't be able to find a type to instantiate the opaque type. |
|
possibly better solution: if |
Would that mean that if |
source/rust_verify/src/driver.rs
Outdated
| } | ||
|
|
||
| impl rustc_driver::Callbacks for CompilerCallbacksEraseMacro { | ||
| #[cfg(verus_verify_core)] |
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.
Why are these cfg options necessary?
This is already a runtime option, we don't need it to be a compile-time option as well. I'd prefer to avoid unnecessary compile-time options.
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.
The last time we talked about this code, you had said that for merging it into main, it was a kind of hacky way to get around errors about stable attributes, so you felt more comfortable putting it behind verify_core.
But if upon further inspection you think it already has the necessary setup, I can take these cfgs out. (And to clarify, is it correct that you would want either all of them in or none of them?)
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.
As long as it's behind the runtime check, that's good enough.
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.
They should all be removed now
|
Regarding the changes to However, it seems like compilation of the Rust stdlib now works fine if I revert these changes - if I run @tjhance are there any other places I should test compilation before determining that the |
If it works on your rustlib branch, then it's all good. |
It appears that although basic compilation works on
I will look into figuring out how to erase the entire assume_specification function. |
Port updates to Verus internals that Travis made on
verify-rustlibtomain.By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.