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

Improve PanicInfo examples readability #71480

Merged
merged 1 commit into from
Apr 25, 2020

Conversation

GuillaumeGomez
Copy link
Member

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 23, 2020
/// panic_info
/// .payload()
/// .downcast_ref::<&str>()
/// .expect("downcast_ref failed"));
Copy link
Contributor

Choose a reason for hiding this comment

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

This can still panic, and you don't want that inside a panic handler ;)

@rust-highfive
Copy link
Collaborator

Your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-04-23T18:31:19.4195642Z ========================== Starting Command Output ===========================
2020-04-23T18:31:19.4198966Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/5b437de4-06be-401f-9af5-0c583f765bda.sh
2020-04-23T18:31:19.4199355Z 
2020-04-23T18:31:19.4203737Z ##[section]Finishing: Disable git automatic line ending conversion
2020-04-23T18:31:19.4221319Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/71480/merge to s
2020-04-23T18:31:19.4224944Z Task         : Get sources
2020-04-23T18:31:19.4225223Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-04-23T18:31:19.4225500Z Version      : 1.0.0
2020-04-23T18:31:19.4225704Z Author       : Microsoft
---
2020-04-23T18:31:20.6771037Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-04-23T18:31:20.6780249Z ##[command]git config gc.auto 0
2020-04-23T18:31:20.6786350Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-04-23T18:31:20.6791794Z ##[command]git config --get-all http.proxy
2020-04-23T18:31:20.6802050Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/71480/merge:refs/remotes/pull/71480/merge
---
2020-04-23T18:34:32.2698518Z  ---> 318032b5f0e2
2020-04-23T18:34:32.2700581Z Step 5/8 : ENV RUST_CONFIGURE_ARGS       --build=x86_64-unknown-linux-gnu       --llvm-root=/usr/lib/llvm-8       --enable-llvm-link-shared       --set rust.thin-lto-import-instr-limit=10
2020-04-23T18:34:32.2701294Z  ---> Using cache
2020-04-23T18:34:32.2701842Z  ---> d44a858fd1ce
2020-04-23T18:34:32.2702940Z Step 6/8 : ENV SCRIPT python2.7 ../x.py test --exclude src/tools/tidy &&            python2.7 ../x.py test src/test/mir-opt --pass=build                                   --target=armv5te-unknown-linux-gnueabi &&            python2.7 ../x.py test src/tools/tidy
2020-04-23T18:34:32.2704138Z  ---> 58b910f50f5a
2020-04-23T18:34:32.2704402Z Step 7/8 : ENV NO_DEBUG_ASSERTIONS=1
2020-04-23T18:34:32.2704809Z  ---> Using cache
2020-04-23T18:34:32.2705182Z  ---> ee7702aadba1
---
2020-04-23T18:34:32.3844548Z Looks like docker image is the same as before, not uploading
2020-04-23T18:34:39.1863272Z [CI_JOB_NAME=x86_64-gnu-llvm-8]
2020-04-23T18:34:39.2122108Z [CI_JOB_NAME=x86_64-gnu-llvm-8]
2020-04-23T18:34:39.2153610Z == clock drift check ==
2020-04-23T18:34:39.2161001Z   local time: Thu Apr 23 18:34:39 UTC 2020
2020-04-23T18:34:39.3163586Z   network time: Thu, 23 Apr 2020 18:34:39 GMT
2020-04-23T18:34:39.3173843Z Starting sccache server...
2020-04-23T18:34:39.4032430Z configure: processing command line
2020-04-23T18:34:39.4032707Z configure: 
2020-04-23T18:34:39.4033577Z configure: rust.dist-src        := False
---
2020-04-23T18:39:43.5593142Z    Compiling rustc_feature v0.0.0 (/checkout/src/librustc_feature)
2020-04-23T18:39:44.9291319Z    Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2020-04-23T18:39:46.4681104Z    Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
2020-04-23T18:39:47.0199808Z    Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
2020-04-23T18:39:56.0123431Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-04-23T18:39:57.6299755Z    Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
2020-04-23T18:40:01.7847305Z    Compiling rustc_attr v0.0.0 (/checkout/src/librustc_attr)
2020-04-23T18:40:05.7718885Z    Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2020-04-23T18:40:15.3536619Z    Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
2020-04-23T19:00:44.5846321Z    Compiling rustc_feature v0.0.0 (/checkout/src/librustc_feature)
2020-04-23T19:00:46.0327638Z    Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2020-04-23T19:00:47.7356527Z    Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
2020-04-23T19:00:47.8001004Z    Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
2020-04-23T19:00:57.6789300Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-04-23T19:00:59.5505738Z    Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
2020-04-23T19:01:03.8300147Z    Compiling rustc_attr v0.0.0 (/checkout/src/librustc_attr)
2020-04-23T19:01:08.0229868Z    Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2020-04-23T19:01:18.0824029Z    Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
2020-04-23T19:22:31.1648632Z .................................................................................................... 1700/9917
2020-04-23T19:22:35.0278026Z .................................................................................................... 1800/9917
2020-04-23T19:22:42.6121798Z .................................................................................................... 1900/9917
2020-04-23T19:22:49.9537280Z .....i.............................................................................................. 2000/9917
2020-04-23T19:22:55.6078713Z ...............................................................................................iiiii 2100/9917
2020-04-23T19:23:13.6527670Z .................................................................................................... 2300/9917
2020-04-23T19:23:15.6842683Z .................................................................................................... 2400/9917
2020-04-23T19:23:17.8675363Z .................................................................................................... 2500/9917
2020-04-23T19:23:23.1914861Z .................................................................................................... 2600/9917
---
2020-04-23T19:26:08.3228800Z .................................................................................................... 5100/9917
2020-04-23T19:26:14.9175605Z .................................................................................................... 5200/9917
2020-04-23T19:26:19.4283822Z ..................i................................................................................. 5300/9917
2020-04-23T19:26:28.4915198Z ........i........................................................................................... 5400/9917
2020-04-23T19:26:33.5114838Z ........ii.ii........i...i.......................................................................... 5500/9917
2020-04-23T19:26:40.7864526Z .......................................................i............................................ 5700/9917
2020-04-23T19:26:49.1182051Z ........................................................................................ii.......... 5800/9917
2020-04-23T19:26:55.4676018Z ...........................i........................................................................ 5900/9917
2020-04-23T19:27:00.5244164Z .................................................................................................... 6000/9917
2020-04-23T19:27:00.5244164Z .................................................................................................... 6000/9917
2020-04-23T19:27:10.2578577Z .................................................................................................... 6100/9917
2020-04-23T19:27:19.5668281Z .....................ii...i..ii...........i......................................................... 6200/9917
2020-04-23T19:27:33.9690869Z .................................................................................................... 6400/9917
2020-04-23T19:27:37.1697206Z .................................................................................................... 6500/9917
2020-04-23T19:27:37.1697206Z .................................................................................................... 6500/9917
2020-04-23T19:27:45.0760122Z ...................................................i..ii............................................ 6600/9917
2020-04-23T19:28:06.4571771Z .................................................................................................... 6800/9917
2020-04-23T19:28:08.6070379Z ....................................................i............................................... 6900/9917
2020-04-23T19:28:10.4829959Z .................................................................................................... 7000/9917
2020-04-23T19:28:12.4050761Z ............................................................................................i....... 7100/9917
---
2020-04-23T19:29:40.8179116Z .................................................................................................... 7900/9917
2020-04-23T19:29:46.0795176Z .................................................................................................... 8000/9917
2020-04-23T19:29:51.7062726Z ...........................................................i........................................ 8100/9917
2020-04-23T19:30:00.5954241Z .................................................................................................... 8200/9917
2020-04-23T19:30:05.6383226Z ........iiiiii.iiiii.i.............................................................................. 8300/9917
2020-04-23T19:30:18.1425777Z .................................................................................................... 8500/9917
2020-04-23T19:30:25.0714780Z .................................................................................................... 8600/9917
2020-04-23T19:30:37.1599199Z .................................................................................................... 8700/9917
2020-04-23T19:30:43.0868928Z .................................................................................................... 8800/9917
---
2020-04-23T19:32:51.7897467Z Suite("src/test/codegen") not skipped for "bootstrap::test::Codegen" -- not in ["src/tools/tidy"]
2020-04-23T19:32:51.8087391Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-04-23T19:32:52.0074436Z 
2020-04-23T19:32:52.0074755Z running 186 tests
2020-04-23T19:32:54.7776274Z iiii......i.............ii.i..........i.............................i..i..................i....i.... 100/186
2020-04-23T19:32:57.2027619Z ........i.i.i...iii..iiiiiiiiiiiiiiii.......................iii...............ii......
2020-04-23T19:32:57.2029969Z 
2020-04-23T19:32:57.2034686Z  finished in 5.394
2020-04-23T19:32:57.2042498Z Suite("src/test/codegen-units") not skipped for "bootstrap::test::CodegenUnits" -- not in ["src/tools/tidy"]
2020-04-23T19:32:57.2233703Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-04-23T19:32:59.2938890Z Suite("src/test/assembly") not skipped for "bootstrap::test::Assembly" -- not in ["src/tools/tidy"]
2020-04-23T19:32:59.3125125Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-04-23T19:32:59.4604680Z 
2020-04-23T19:32:59.4605025Z running 9 tests
2020-04-23T19:32:59.4606216Z iiiiiiiii
2020-04-23T19:32:59.4607311Z 
2020-04-23T19:32:59.4607480Z  finished in 0.148
2020-04-23T19:32:59.4611530Z Suite("src/test/incremental") not skipped for "bootstrap::test::Incremental" -- not in ["src/tools/tidy"]
2020-04-23T19:32:59.4804813Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-04-23T19:33:18.4620225Z Suite("src/test/debuginfo") not skipped for "bootstrap::test::Debuginfo" -- not in ["src/tools/tidy"]
2020-04-23T19:33:18.4850957Z Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-04-23T19:33:19.3995962Z 
2020-04-23T19:33:19.3997000Z running 115 tests
2020-04-23T19:33:32.0343084Z iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii.........i.....i..i.......ii.i.ii.. 100/115
2020-04-23T19:33:33.6806714Z ...iiii.....ii.
2020-04-23T19:33:33.6815398Z 
2020-04-23T19:33:33.6815558Z  finished in 15.197
2020-04-23T19:33:33.6824212Z Suite("src/test/ui-fulldeps") not skipped for "bootstrap::test::UiFullDeps" -- not in ["src/tools/tidy"]
2020-04-23T19:33:33.6827071Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-04-23T19:44:12.2937927Z 
2020-04-23T19:44:12.2938878Z    Doc-tests core
2020-04-23T19:44:16.7039806Z 
2020-04-23T19:44:16.7047379Z running 2499 tests
2020-04-23T19:44:24.7807747Z ......iiiii......................................................................................... 100/2499
2020-04-23T19:44:32.6837463Z ......................................................................................ii............ 200/2499
2020-04-23T19:44:50.8519307Z ......................i............................................................................. 400/2499
2020-04-23T19:44:59.5768207Z ............................................................................i..i..................ii 500/2499
2020-04-23T19:45:06.2128748Z ii.................................................................................................. 600/2499
2020-04-23T19:45:13.7914186Z .................................................................................................... 700/2499
---
2020-04-23T19:47:34.1554457Z ---- panic.rs - panic::PanicInfo::payload (line 76) stdout ----
2020-04-23T19:47:34.1554761Z error: unexpected closing delimiter: `)`
2020-04-23T19:47:34.1555153Z   --> panic.rs:85:2
2020-04-23T19:47:34.1555302Z    |
2020-04-23T19:47:34.1555731Z 7  |     if let Some(s) = panic_info.payload().downcast_ref::<&str>()
2020-04-23T19:47:34.1556405Z    |                                                               -- this block is empty, you might have not meant to close it
2020-04-23T19:47:34.1556833Z 12 | }));
2020-04-23T19:47:34.1557008Z    |  ^ unexpected closing delimiter
2020-04-23T19:47:34.1557147Z 
2020-04-23T19:47:34.1557321Z error: mismatched closing delimiter: `}`
2020-04-23T19:47:34.1557321Z error: mismatched closing delimiter: `}`
2020-04-23T19:47:34.1557696Z   --> panic.rs:85:1
2020-04-23T19:47:34.1557841Z    |
2020-04-23T19:47:34.1557974Z 3  | fn main() {
2020-04-23T19:47:34.1558370Z    |           - closing delimiter possibly meant for this
2020-04-23T19:47:34.1558561Z ...
2020-04-23T19:47:34.1558742Z 6  | panic::set_hook(Box::new(|panic_info| {
2020-04-23T19:47:34.1559348Z ...
2020-04-23T19:47:34.1559468Z 12 | }));
2020-04-23T19:47:34.1559647Z    | ^ mismatched closing delimiter
2020-04-23T19:47:34.1559787Z 
---
2020-04-23T19:47:34.1657012Z 
2020-04-23T19:47:34.1657606Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --exclude src/tools/tidy
2020-04-23T19:47:34.1657924Z Build completed unsuccessfully in 1:11:17
2020-04-23T19:47:34.1709867Z == clock drift check ==
2020-04-23T19:47:34.1740231Z   local time: Thu Apr 23 19:47:34 UTC 2020
2020-04-23T19:47:34.4681718Z   network time: Thu, 23 Apr 2020 19:47:34 GMT
2020-04-23T19:47:34.8524719Z 
2020-04-23T19:47:34.8524719Z 
2020-04-23T19:47:34.8597633Z ##[error]Bash exited with code '1'.
2020-04-23T19:47:34.8611565Z ##[section]Finishing: Run build
2020-04-23T19:47:34.8664994Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/71480/merge to s
2020-04-23T19:47:34.8669886Z Task         : Get sources
2020-04-23T19:47:34.8670183Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-04-23T19:47:34.8670465Z Version      : 1.0.0
2020-04-23T19:47:34.8670657Z Author       : Microsoft
2020-04-23T19:47:34.8670657Z Author       : Microsoft
2020-04-23T19:47:34.8670963Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-04-23T19:47:34.8671453Z ==============================================================================
2020-04-23T19:47:35.1863690Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-04-23T19:47:35.1909103Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/71480/merge to s
2020-04-23T19:47:35.2000618Z Cleaning up task key
2020-04-23T19:47:35.2001842Z Start cleaning up orphan processes.
2020-04-23T19:47:35.2174446Z Terminate orphan process: pid (3557) (python)
2020-04-23T19:47:35.2390532Z ##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@Dylan-DPC-zz
Copy link

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Apr 24, 2020

📌 Commit 03817ec has been approved by Dylan-DPC

@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 Apr 24, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Apr 24, 2020
…r=Dylan-DPC

Improve PanicInfo examples readability

cc @Eijebong

r? @Dylan-DPC
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 24, 2020
Rollup of 8 pull requests

Successful merges:

 - rust-lang#69456 (fix misleading type annotation diagonstics)
 - rust-lang#71330 (Only run dataflow for const qualification if type-based check would fail)
 - rust-lang#71480 (Improve PanicInfo examples readability)
 - rust-lang#71485 (Add BinaryHeap::retain as suggested in rust-lang#42849)
 - rust-lang#71512 (Remove useless "" args)
 - rust-lang#71527 (Miscellaneous cleanup in `check_consts`)
 - rust-lang#71534 (Avoid unused Option::map results)
 - rust-lang#71535 (Fix typos in docs for keyword "in")

Failed merges:

r? @ghost
@bors bors merged commit a23d8ec into rust-lang:master Apr 25, 2020
@GuillaumeGomez GuillaumeGomez deleted the panic-info-example branch April 27, 2020 09:21
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.

5 participants