-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Add long explanation for E0757 #87342
Conversation
Some changes occurred in diagnostic error codes |
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jackh726 (or someone else) soon. Please see the contribution instructions for more information. |
} | ||
``` | ||
|
||
As `const` has a stricter set of requirements than `pure`, remove the `ffi_pure` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ffi_const
you mean? Also, is there a documentation we could link to by any chance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I mean const
. const
and pure
are C function attributes (e.g. see Common Function Attributes). Annotating a function with ffi_const
says that it's C const
, and annotating with ffi_pure
says that it's C pure
. I could use ffi_const
and ffi_pure
instead, but I felt it was more readable to lift the covers up to what they mean in GCC or other C compilers. What do you think?
I could link to ffi-pure and ffi-const from the unstable rust book. The former does mention that #[ffi_const]
provides stronger guarantees, which implies that it's stricter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use ffi_*
instead then. If I asked the questions, others will wonder about the same thing as well. Please add the links as well then.
Thanks! @bors: r+ rollup squash |
📌 Commit 8b75fec has been approved by |
…laumeGomez Rollup of 9 pull requests Successful merges: - rust-lang#87187 (Fix NixOS detection) - rust-lang#87206 (avoid temporary vectors/reuse iterators) - rust-lang#87230 (Fix docblock <table> overflow) - rust-lang#87273 (Recognize bounds on impls as const bounds) - rust-lang#87279 (Add comments explaining the unix command-line argument support.) - rust-lang#87301 (Fix typo in compile.rs) - rust-lang#87311 (Get back the more precise suggestion spans of old regionck) - rust-lang#87321 (Add long explanation for E0722) - rust-lang#87342 (Add long explanation for E0757) Failed merges: - rust-lang#87270 (Don't display <table> in item summary) r? `@ghost` `@rustbot` modify labels: rollup
Helps with #61137