Skip to content

Fix example in FFI tutorial. - #4263

Closed
ejholmes wants to merge 1 commit into
rust-lang:masterfrom
ejholmes:ffi-crypto
Closed

Fix example in FFI tutorial.#4263
ejholmes wants to merge 1 commit into
rust-lang:masterfrom
ejholmes:ffi-crypto

Conversation

@ejholmes

Copy link
Copy Markdown
Contributor

These changes were necessary to get this example to compile. Not sure how to get command line args now, since fn main(args: ~[~str]) produces the following compiler error:

main.rs:21:0: 23:1 error: Wrong type in main function: found `fn(~[~str])`, expected `fn() -> ()`

@catamorphism

Copy link
Copy Markdown
Contributor

You can get command-line args by calling core::os::args. If you don't mind changing that, I'll merge. Thanks! Also, can you change the target branch to incoming instead of master? (This may require closing this and submitting a new pull request, I'm not sure.)

@ejholmes ejholmes closed this Dec 23, 2012
RalfJung added a commit to RalfJung/rust that referenced this pull request Apr 29, 2025
Replace check_shim with check_shim_abi in unix/foreign_items shims
U007D pushed a commit to U007D/rust-mos that referenced this pull request Aug 21, 2026
6036: Don't re-read open files from disk when reloading a workspace r=kjeremy a=lnicola

Fixes rust-lang#5742
Fixes rust-lang#4263

or so I hope.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
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