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

Add long explanation for E0757 #87342

Merged
merged 3 commits into from
Jul 21, 2021
Merged

Add long explanation for E0757 #87342

merged 3 commits into from
Jul 21, 2021

Conversation

midgleyc
Copy link
Contributor

Helps with #61137

@rust-highfive
Copy link
Collaborator

Some changes occurred in diagnostic error codes

cc @GuillaumeGomez

@rust-highfive
Copy link
Collaborator

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.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 21, 2021
}
```

As `const` has a stricter set of requirements than `pure`, remove the `ffi_pure`
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

@GuillaumeGomez
Copy link
Member

Thanks!

@bors: r+ rollup squash

@bors
Copy link
Contributor

bors commented Jul 21, 2021

📌 Commit 8b75fec has been approved by GuillaumeGomez

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 21, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 21, 2021
…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
@bors bors merged commit 3a8bc0d into rust-lang:master Jul 21, 2021
@rustbot rustbot added this to the 1.55.0 milestone Jul 21, 2021
@midgleyc midgleyc deleted the add-E0757-long branch July 21, 2021 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants