Skip to content

Fix example in FFI tutorial. #4263

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
wants to merge 1 commit into from
Closed

Conversation

ejholmes
Copy link
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
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
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