Skip to content

Conversation

frewsxcv
Copy link
Contributor

No description provided.

@frewsxcv
Copy link
Contributor Author

I'm not mentally attached in any way to the example I wrote, so if anyone has better ideas, I'm very open to changing mine. This was prompted because it wasn't obvious to me what contexts panicking would be used, but after adding an example with Drop, I hope it clears up some confusion for others in the future.

@steveklabnik
Copy link
Contributor


---- thread::panicking_0 stdout ----
    thread 'thread::panicking_0' panicked at 'test executable failed:
a: dropped while not unwinding
b: dropped while unwinding

thread 'main' panicked at 'explicit panic', <anon>:26
note: Run with `RUST_BACKTRACE=1` for a backtrace.
', src/librustdoc/test.rs:312
note: Run with `RUST_BACKTRACE=1` for a backtrace.


failures:
    thread::panicking_0

test result: FAILED. 475 passed; 1 failed; 14 ignored; 0 measured

This test needs to be marked should_panic.

/cc @rust-lang/libs is this a good example? Seems okay to me, but I have never used this method.

@alexcrichton
Copy link
Member

Seems reasonable to me!

@frewsxcv frewsxcv force-pushed the panicking-example branch from f072bc7 to 9944b22 Compare June 17, 2016 22:17
@frewsxcv
Copy link
Contributor Author

This test needs to be marked should_panic.

Done.

@steveklabnik
Copy link
Contributor

@bors: r+ rollup

@bors
Copy link
Collaborator

bors commented Jun 19, 2016

📌 Commit 9944b22 has been approved by steveklabnik

@bors
Copy link
Collaborator

bors commented Jun 19, 2016

⌛ Testing commit 9944b22 with merge d06f1dc...

bors added a commit that referenced this pull request Jun 19, 2016
Add example in docs for `std::thread::panicking`.

None
@bors
Copy link
Collaborator

bors commented Jun 19, 2016

⛄ The build was interrupted to prioritize another pull request.

@bors bors merged commit 9944b22 into rust-lang:master Jun 19, 2016
@frewsxcv frewsxcv deleted the panicking-example branch June 19, 2016 17:26
bors added a commit that referenced this pull request Jun 20, 2016
Rollup of 4 pull requests

- Successful merges: #34313, #34335, #34340, #34356
- Failed merges:
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.

4 participants