-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Native function link name should be an attribute #906
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
Comments
Should native mod be moved to attribute also to keep it consistent with native fn? So
becomes
|
Okay, I guess the answer is yes. Issue #547 (Replace some native module syntax with attributes). |
Also native mods that are crate directives. |
Now I'm about to start hacking crate directive. The plan is:
|
Yes. What you propose sounds good. |
Are native native.rc:
native "cdecl" mod rustrt {
fn str_buf(str s) -> int;
}
native mod libc = target_libc {
fn puts(int s) -> ();
} but the reference states |
Seems to be a feature that was never implemented, and I don't think there's any need. |
The path information was an optional "filename" component of crate directive AST. It is now replaced by an attribute with metadata named "path". With this commit, a directive mod foo = "foo.rs"; should be written as: #[path = "foo.rs"] mod foo; Closes issue rust-lang#906.
The path information was an optional "filename" component of crate directive AST. It is now replaced by an attribute with metadata named "path". With this commit, a directive mod foo = "foo.rs"; should be written as: #[path = "foo.rs"] mod foo; Closes issue #906.
I guess this can be closed? Or should we remove the tests: ./run-pass/native-mod.rc |
Let's leave the tests as a reminder that somebody wanted that feature at some point. |
* Remove expression from cbmc check descriptions We have no control over the expression printed. These checks usually end up printing some temporary variables which are rather confusing. For now, we replace the message to remove the expressions and make it more user friendly.
Instead of
we should write
The text was updated successfully, but these errors were encountered: