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

RFC 2070 part 1: PanicInfo and Location API changes #47687

Merged
merged 5 commits into from
Feb 18, 2018

Conversation

SimonSapin
Copy link
Contributor

This implements part of https://rust-lang.github.io/rfcs/2070-panic-implementation.html
Tracking issue: #44489

  • Move std::panic::PanicInfo and std::panic::Location to a new core::panic module. The two types and the std module were already #[stable] and stay that way, the new core module is #[unstable].
  • Add a new PanicInfo::message(&self) -> Option<&fmt::Arguments> method, which is #[unstable].
  • Implement Display for PanicInfo and Location

@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 @bluss (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@kennytm kennytm added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Jan 24, 2018
///
/// panic!("Normal panic");
/// ```
#[stable(feature = "panic_col", since = "1.25")]
Copy link
Member

Choose a reason for hiding this comment

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

Let's correct this to 1.25.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, and other similar occurrences.

@alexcrichton
Copy link
Member

@rfcbot fcp merge

Looks great to me, thanks @SimonSapin!

@rfcbot
Copy link

rfcbot commented Jan 24, 2018

Team member @alexcrichton has proposed to merge this. The next step is review by the rest of the tagged teams:

No concerns currently listed.

Once these reviewers reach consensus, this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added the proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. label Jan 24, 2018
@kennytm kennytm added S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 24, 2018
/// A struct providing information about a panic.
///
/// `PanicInfo` structure is passed to a panic hook set by the [`set_hook`]
/// function.
Copy link
Member

Choose a reason for hiding this comment

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

I think the documentation should mention the no-std case.

@shepmaster
Copy link
Member

Ping for ticky boxes @BurntSushi, @Kimundi!

@rfcbot
Copy link

rfcbot commented Feb 16, 2018

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Feb 16, 2018
@kennytm kennytm added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). labels Feb 16, 2018
@sfackler
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Feb 16, 2018

📌 Commit 399dcd1 has been approved by sfackler

@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 Feb 16, 2018
@bors
Copy link
Contributor

bors commented Feb 16, 2018

⌛ Testing commit 399dcd1 with merge 19a8766c42c47b4a3769394a4f79e4cef31def87...

@bors
Copy link
Contributor

bors commented Feb 17, 2018

💔 Test failed - status-travis

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 17, 2018
@SimonSapin
Copy link
Contributor Author

No output has been received in the last 30m0s, this potentially indicates a stalled build or something wrong with the build itself.

@kennytm
Copy link
Member

kennytm commented Feb 17, 2018

@bors retry #40474

@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 Feb 17, 2018
@bors
Copy link
Contributor

bors commented Feb 18, 2018

⌛ Testing commit 399dcd1 with merge 1ad094d...

bors added a commit that referenced this pull request Feb 18, 2018
RFC 2070 part 1: PanicInfo and Location API changes

This implements part of https://rust-lang.github.io/rfcs/2070-panic-implementation.html
Tracking issue: #44489

* Move `std::panic::PanicInfo` and `std::panic::Location` to a new `core::panic` module. The two types and the `std` module were already `#[stable]` and stay that way, the new `core` module is `#[unstable]`.
* Add a new `PanicInfo::message(&self) -> Option<&fmt::Arguments>` method, which is `#[unstable]`.
* Implement `Display` for `PanicInfo` and `Location`
@bors
Copy link
Contributor

bors commented Feb 18, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: sfackler
Pushing 1ad094d to master...

@bors bors merged commit 399dcd1 into rust-lang:master Feb 18, 2018
@SimonSapin SimonSapin deleted the panic-impl branch March 30, 2018 13:52
bors added a commit that referenced this pull request Apr 9, 2018
Correct a few stability attributes

* `const_indexing` language feature was stabilized in 1.26.0 by #46882
* `Display` impls for `PanicInfo` and `Location` were stabilized in 1.26.0 by #47687
* `TrustedLen` is still unstable so its impls should be as well even though `RangeInclusive` was stabilized by #47813
* `!Send` and `!Sync` for `Args` and `ArgsOs` were stabilized in 1.26.0 by #48005
* `EscapeDefault` has been stable since 1.0.0 so should continue to show that even though it was moved to core in #48735

This could be backported to beta like #49612
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants