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.
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.
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.
As long as it's behind the runtime check, that's good enough.
There was a problem hiding this comment.
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. |
| m.map.insert(hir_id.local_id, Box::leak(attrs.into_boxed_slice())); | ||
| Box::leak(Box::new(m)) | ||
|
|
||
| /* |
There was a problem hiding this comment.
What's the commented-out code for?
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.