Skip to content
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

tutorial: Fix type mismatch in example FFI code #1183

Merged
merged 1 commit into from
Nov 17, 2011

Conversation

lht
Copy link
Contributor

@lht lht commented Nov 17, 2011

Compile error:
time.rs:13:23: 13:43 error: mismatched types: expected
*R[tv_sec=mMltv_usec=mMl] but found *R[tv_sec=Mltv_usec=Ml](record
elements differ in mutability)
time.rs:13 libc::gettimeofday(std::ptr::addr_of(x), std::ptr::null());
^~~~~~~~~~~~~~~~~~~~
error: aborting due to previous errors
rust: upcall fail 'explicit failure', ../src/comp/driver/session.rs:70
rust: domain main @0x9dfd178 root task failed

Compile error:
time.rs:13:23: 13:43 error: mismatched types: expected
*R[tv_sec=mMltv_usec=mMl] but found *R[tv_sec=Mltv_usec=Ml] (record
elements differ in mutability)
time.rs:13     libc::gettimeofday(std::ptr::addr_of(x),
std::ptr::null());
                                  ^~~~~~~~~~~~~~~~~~~~
error: aborting due to previous errors
rust: upcall fail 'explicit failure', ../src/comp/driver/session.rs:70
rust: domain main @0x9dfd178 root task failed
@brson brson merged commit f4eb25e into rust-lang:master Nov 17, 2011
@brson
Copy link
Contributor

brson commented Nov 17, 2011

Thanks!

bjorn3 added a commit to bjorn3/rust that referenced this pull request Jul 7, 2021
coastalwhite pushed a commit to coastalwhite/rust that referenced this pull request Aug 5, 2023
coastalwhite pushed a commit to coastalwhite/rust that referenced this pull request Aug 5, 2023
celinval pushed a commit to celinval/rust-dev that referenced this pull request Jun 4, 2024
Kobzol pushed a commit to Kobzol/rust that referenced this pull request Dec 30, 2024
* Expand THIR section with more details
* Remove incorrect reference to `HirId`s

Co-authored-by: Léo Lanteri Thauvin <leseulartichaut@gmail.com>
bors pushed a commit to rust-lang-ci/rust that referenced this pull request Jan 2, 2025
* Expand THIR section with more details
* Remove incorrect reference to `HirId`s

Co-authored-by: Léo Lanteri Thauvin <leseulartichaut@gmail.com>
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

Successfully merging this pull request may close these issues.

2 participants