Skip to content

rustboot compile error with OCaml 3.12 #169

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

Closed
ghost opened this issue Oct 11, 2010 · 6 comments
Closed

rustboot compile error with OCaml 3.12 #169

ghost opened this issue Oct 11, 2010 · 6 comments

Comments

@ghost
Copy link

ghost commented Oct 11, 2010

Changes in OCaml for version 3.12 give compile errors in rustboot:
compile: boot/fe/cexp.ml
File "boot/fe/cexp.ml", line 347, characters 15-24:
Warning 9: the following labels are not bound in this record pattern:
id
Either bind these labels explicitly or add ; _' to the pattern. File "boot/fe/cexp.ml", line 361, characters 15-24: Warning 9: the following labels are not bound in this record pattern: id Either bind these labels explicitly or add; _' to the pattern.
File "boot/fe/cexp.ml", line 1, characters 0-1:
Error: Error-enabled warnings (2 occurrences)
make: *** [boot/fe/cexp.cmx] Error 2

(thanks to Jeff Schultz for confirming this)

@pcwalton
Copy link
Contributor

Commit 9908629 should fix this; please verify.

@ghost
Copy link
Author

ghost commented Oct 11, 2010

Apologies. I should have done 'make -k'. There are a lot more than this, which I've fixed myself by adding '; _' where suggested. Is that syntax OK in 3.11? If so I can post a diff or push the changes.
However there were 2 more errors I couldn't fix:
compile: boot/llvm/lltrans.ml
File "boot/llvm/lltrans.ml", line 371, characters 25-26:
Warning 28: wildcard pattern given as argument to a constant constructor
File "boot/llvm/lltrans.ml", line 373, characters 25-26:
Warning 28: wildcard pattern given as argument to a constant constructor
I tried a named var instead of the wildcard but got a different warning instead.
Thanks.

@ghost
Copy link
Author

ghost commented Oct 11, 2010

Actually I just got rid of the _ since MODE_alias didn't seem to take an argument, i.e.

@@ -368,9 +368,9 @@ let trans_crate
     in
     let base_llty = trans_ty ty in
       match slot.Ast.slot_mode with
-        | Ast.MODE_alias _ ->
+        | Ast.MODE_alias  ->
             Llvm.pointer_type base_llty
-        | Ast.MODE_local _ -> base_llty
+        | Ast.MODE_local  -> base_llty
   in

   let get_element_ptr

Does that look OK?

@pcwalton
Copy link
Contributor

'; _' is fine in OCaml 3.11.

And that looks good to me. I'd take a pull request, thanks for looking into this :)

@ghost
Copy link
Author

ghost commented Oct 12, 2010

I've put in the pull request, it's issue #172.

@graydon
Copy link
Contributor

graydon commented Jan 27, 2011

Fixed long ago.

oli-obk added a commit to oli-obk/rust that referenced this issue Jul 19, 2017
keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
dlrobertson pushed a commit to dlrobertson/rust that referenced this issue Nov 29, 2018
Remove unused link reference.
djtech-dev pushed a commit to djtech-dev/rust that referenced this issue Dec 9, 2021
celinval added a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
)

This changes the compilation to use crate type lib instead of binary when
we are running rmc on a single .rs file. This allow us to use
any public function as a verification target.

We have also changed the tests to use pub main so it is exported and it
can be used as the entry point of the proof.

Fix cargo-rmc and the current testcase to support library build.
celinval pushed a commit to celinval/rust-dev that referenced this issue Dec 6, 2024
…ust-lang#169)

Towards model-checking#76

### Changes
* Adds contracts for `<*mut T>::byte_add`, `<*mut T>::byte_sub` and
`<*mut T>::byte_offset`.
* Adds harnesses for the function verifying the following pointee types:
    * All integer types
    * Tuples (composite types)
    * Unit Type
    * Slices
* Accomplishes this using a few macros.

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.

---------

Co-authored-by: Yifei Wang <[email protected]>
Co-authored-by: Yifei Wang <[email protected]>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants