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 error explanation for E0755 #76439

Merged
merged 1 commit into from
Sep 21, 2020

Conversation

GuillaumeGomez
Copy link
Member

extern "C" {
#[ffi_pure] // ok!
pub fn strlen(s: *const i8) -> isize;
}
Copy link
Contributor

@pickfire pickfire Sep 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this also work right? Or maybe a better example of this.

#[ffi_pure]
extern "C" pub fn foo() {}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to have a bigger contrast. :)

Copy link
Contributor

@pickfire pickfire Sep 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I was just suggesting to show both methods so the readers know. Personally I know the second more.

Comment on lines 14 to 15
effects except for their return value. You can find more information about it in
the [unstable Rust Book].
Copy link
Contributor

@pickfire pickfire Sep 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
effects except for their return value. You can find more information about it in
the [unstable Rust Book].
side effects or infinite loops. You can find more information about it in the
[unstable Rust Book].

Returning value is probably not counted as side effects.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I quoted the book.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I took from the book too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then perfect. :)

@jyn514 jyn514 added the A-error-codes Area: Explanation of an error code (--explain) label Sep 8, 2020
@GuillaumeGomez GuillaumeGomez force-pushed the add-error-explanation-e0755 branch from 3451bd8 to 69ffed7 Compare September 8, 2020 19:08
@GuillaumeGomez
Copy link
Member Author

Updated!

@GuillaumeGomez
Copy link
Member Author

GuillaumeGomez commented Sep 9, 2020

@bors: r=pickfire,jyn514 rollup

@bors
Copy link
Contributor

bors commented Sep 21, 2020

📌 Commit 69ffed7 has been approved by pickfire,jyn514

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Sep 21, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 21, 2020
Rollup of 10 pull requests

Successful merges:

 - rust-lang#76439 (Add error explanation for E0755)
 - rust-lang#76521 (Fix segfault if pthread_getattr_np fails)
 - rust-lang#76835 (make replace_prefix only take &str as arguments )
 - rust-lang#76967 (Revert adding Atomic::from_mut.)
 - rust-lang#76977 (Add a regression test for copy propagation miscompilation)
 - rust-lang#76981 (liballoc bench use imported path Bencher)
 - rust-lang#76983 (BTreeMap: extra testing & fixed comments)
 - rust-lang#76996 (Fix typo in rustc_lexer docs)
 - rust-lang#77009 (Dogfood total_cmp in the test crate)
 - rust-lang#77012 (update Miri for another bugfix)

Failed merges:

 - rust-lang#76489 (Add explanation for E0756)

r? `@ghost`
@bors bors merged commit 670e204 into rust-lang:master Sep 21, 2020
@rustbot rustbot added this to the 1.48.0 milestone Sep 21, 2020
@GuillaumeGomez GuillaumeGomez deleted the add-error-explanation-e0755 branch September 21, 2020 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-error-codes Area: Explanation of an error code (--explain) 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.

5 participants