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

Rename remaining Failures in Documentation to Panic #18773

Merged
merged 1 commit into from
Nov 21, 2014
Merged

Rename remaining Failures in Documentation to Panic #18773

merged 1 commit into from
Nov 21, 2014

Conversation

subhashb
Copy link

@subhashb subhashb commented Nov 8, 2014

I have also renamed fail to panic in some non-documentation comments, where I thought it mattered.
Fixes #18677

cc @steveklabnik

@rust-highfive
Copy link
Collaborator

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

@@ -43,7 +43,7 @@ pub unsafe fn reallocate(ptr: *mut u8, old_size: uint, size: uint, align: uint)
/// Resize the allocation referenced by `ptr` to `size` bytes.
///
/// If the operation succeeds, it returns `usable_size(size, align)` and if it
/// fails (or is a no-op) it returns `usable_size(old_size, align)`.
/// panics (or is a no-op) it returns `usable_size(old_size, align)`.
Copy link
Member

Choose a reason for hiding this comment

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

This is a good change, but should probably move to a Panics section like the others have.

Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't a panic. Otherwise it would be nonsense to speak of the return value.

Copy link
Member

Choose a reason for hiding this comment

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

oh duh, lol

@subhashb
Copy link
Author

subhashb commented Nov 8, 2014

@steveklabnik Comments addressed. I have also removed some unnecessary changes; better verify if system actually panics in those situations, before we change wording.

@subhashb
Copy link
Author

Conflicts resolved and rebased.
Since this PR involves too many files, can it get a r+ asap?

/// `low >= high`.
/// Generate a random value in the range [`low`, `high`).
///
/// # Panics
Copy link
Member

Choose a reason for hiding this comment

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

This should move to the end of the doc-block so that "This is a convience ..." isn't included in this subsection.

Copy link
Author

Choose a reason for hiding this comment

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

@huonw Agree 👍. Moved below explanation section.

@steveklabnik
Copy link
Member

@subhashb sorry, didn't see that this other nit got addressed. We've had a few PRs for this, can you rebase it one more time, then leave a comment? I'll r+ asap after you do.

@subhashb
Copy link
Author

@steveklabnik Rebased. Good to pull now.

bors added a commit that referenced this pull request Nov 20, 2014
…nic, r=steveklabnik

I have also renamed `fail` to `panic` in some non-documentation comments, where I thought it mattered.
Fixes #18677 

cc @steveklabnik
@bors bors closed this Nov 21, 2014
@bors bors merged commit bc9de77 into rust-lang:master Nov 21, 2014
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Nov 27, 2014
Just saw this when looking at rust-lang#19297 and couldn't find an issue/PR dealing with this. rust-lang#18773 seems to have missed this file.

Compiler output is generated [here](https://github.com/rust-lang/rust/blob/770378a313a573776b16237a46b75bafa49072c1/src/librustc_trans/driver/mod.rs#L466).

cc @steveklabnik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update API docs and conventions for fail -> panic
6 participants