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: rework nolink description to remove mention of "empty string" #1502

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions doc/tutorial/ffi.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,8 @@ microsecond-resolution timer.
ret (x.tv_sec as u64) * 1000_000_u64 + (x.tv_usec as u64);
}

The `#[nolink]` sets the name of the native module to the
empty string to prevent the rust compiler from trying to link it.
The standard C library is already linked with Rust programs.
The `#[nolink]` attribute indicates that there's no native library to link
in. The standard C library is already linked with Rust programs.

A `timeval`, in C, is a struct with two 32-bit integers. Thus, we
define a record type with the same contents, and declare
Expand Down