Skip to content

Move the <dyn Error>::chain() method to a trait #69163

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

Closed
wants to merge 1 commit into from

Conversation

haraldh
Copy link
Contributor

@haraldh haraldh commented Feb 14, 2020

Because chain() was only implemented for dyn Error, users had
to cast errors to a &(dyn Error) to use the chain() method.

    let mut iter = (&my_error as &(dyn Error)).chain();
    // or
    let mut iter = <dyn Error>::chain(&my_error);
    // or
    let mut iter = Error::chain(&my_error);

What I would liked to have is

pub trait Error: Debug + Display {
    fn source(&self) -> Option<&(dyn Error + 'static)> {
        None
    }

    fn chain(&self) -> Chain<'_> where Self: Sized + 'static {
        Chain {
            current: Some(self),
        }
    }
}

impl dyn Error + 'static {
    fn chain(&self) -> Chain<'_> {
        Chain {
            current: Some(self),
        }
    }
}

This doesn't work, because of:
#69161

This patch introduces an ErrorChain trait, which accomplishes the
job and is implemented for Error and dyn Error + 'static.

@rust-highfive
Copy link
Contributor

r? @cramertj

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 14, 2020
@haraldh haraldh requested a review from withoutboats February 14, 2020 08:50
@haraldh
Copy link
Contributor Author

haraldh commented Feb 14, 2020

r? @withoutboats
r? @BurntSushi

@haraldh
Copy link
Contributor Author

haraldh commented Feb 14, 2020

r? @withoutboats @BurntSushi

@CryZe
Copy link
Contributor

CryZe commented Feb 14, 2020

Don't you have to import the trait then? Wouldn't just a free standing std::error::chain(...) make more sense?

@haraldh
Copy link
Contributor Author

haraldh commented Feb 14, 2020

Don't you have to import the trait then? Wouldn't just a free standing std::error::chain(...) make more sense?

Hmm... works, but not so ergonomic. E.g. for mybox: Box<dyn Error> you will have to write chain(mybox.as_ref()) instead of simply mybox.chain()

@rust-highfive
Copy link
Contributor

The job x86_64-gnu-llvm-7 of 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-02-14T08:54:41.0084374Z ========================== Starting Command Output ===========================
2020-02-14T08:54:41.0086340Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/3f9a4201-5e92-47f0-9663-df4650a9fa6a.sh
2020-02-14T08:54:41.0086386Z 
2020-02-14T08:54:41.0089562Z ##[section]Finishing: Disable git automatic line ending conversion
2020-02-14T08:54:41.0096119Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69163/merge to s
2020-02-14T08:54:41.0097787Z Task         : Get sources
2020-02-14T08:54:41.0097823Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-14T08:54:41.0097859Z Version      : 1.0.0
2020-02-14T08:54:41.0097947Z Author       : Microsoft
---
2020-02-14T08:54:41.8443512Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-02-14T08:54:41.8538480Z ##[command]git config gc.auto 0
2020-02-14T08:54:41.8621041Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-02-14T08:54:41.8686468Z ##[command]git config --get-all http.proxy
2020-02-14T08:54:41.8835496Z ##[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/69163/merge:refs/remotes/pull/69163/merge
---
2020-02-14T09:55:33.1315387Z .................................................................................................... 1700/9637
2020-02-14T09:55:38.2364965Z .................................................................................................... 1800/9637
2020-02-14T09:55:50.5917966Z ..............................i..................................................................... 1900/9637
2020-02-14T09:55:58.4249164Z .................................................................................................... 2000/9637
2020-02-14T09:56:13.0629028Z ....................iiiii........................................................................... 2100/9637
2020-02-14T09:56:22.9457576Z .................................................................................................... 2300/9637
2020-02-14T09:56:25.4331592Z .................................................................................................... 2400/9637
2020-02-14T09:56:30.5920655Z .................................................................................................... 2500/9637
2020-02-14T09:56:52.0873246Z .................................................................................................... 2600/9637
---
2020-02-14T09:59:39.3647141Z ........................................................................i...............i........... 4900/9637
2020-02-14T09:59:47.4413921Z .................................................................................................... 5000/9637
2020-02-14T09:59:55.6963212Z .................................................................................................... 5100/9637
2020-02-14T10:00:00.7610152Z ..............i..................................................................................... 5200/9637
2020-02-14T10:00:12.0232899Z ........................................................................................ii.ii....... 5300/9637
2020-02-14T10:00:16.1680905Z .i...i.............................................................................................. 5400/9637
2020-02-14T10:00:26.7976955Z .................................................................................................... 5600/9637
2020-02-14T10:00:37.5018345Z .............................................................................i...................... 5700/9637
2020-02-14T10:00:45.7717090Z .................................................................................................... 5800/9637
2020-02-14T10:00:52.5789121Z ...........................................................................i........................ 5900/9637
2020-02-14T10:00:52.5789121Z ...........................................................................i........................ 5900/9637
2020-02-14T10:01:03.5701600Z .....................................................................ii...i..ii...........i......... 6000/9637
2020-02-14T10:01:26.1654929Z .................................................................................................... 6200/9637
2020-02-14T10:01:34.3871300Z .................................................................................................... 6300/9637
2020-02-14T10:01:43.0053411Z .................................................................................................i.. 6400/9637
2020-02-14T10:02:00.7238671Z ii.................................................................................................. 6500/9637
---
2020-02-14T10:04:14.0755338Z .................................................................................................... 7600/9637
2020-02-14T10:04:18.7729445Z .................................................................................................... 7700/9637
2020-02-14T10:04:25.3264139Z .................................................................................................... 7800/9637
2020-02-14T10:04:33.7803528Z .................................................................................................... 7900/9637
2020-02-14T10:04:43.0840064Z ............................................................................iiiiiii.i............... 8000/9637
2020-02-14T10:05:00.0259143Z ................i......i............................................................................ 8200/9637
2020-02-14T10:05:05.8546496Z .................................................................................................... 8300/9637
2020-02-14T10:05:19.5240915Z .................................................................................................... 8400/9637
2020-02-14T10:05:30.0240986Z .................................................................................................... 8500/9637
---
2020-02-14T10:08:06.9968326Z  finished in 7.759
2020-02-14T10:08:07.0152356Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-14T10:08:07.2134934Z 
2020-02-14T10:08:07.2135862Z running 178 tests
2020-02-14T10:08:10.3365932Z iiii......i...........ii..iiii...i....i...........i............i..i..................i....i......... 100/178
2020-02-14T10:08:12.8042709Z ...i.i.i...iii..iiiiiiiiiiiiiiii.......................iii............ii......
2020-02-14T10:08:12.8053585Z 
2020-02-14T10:08:12.8058111Z  finished in 5.790
2020-02-14T10:08:12.8283710Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-14T10:08:13.0120397Z 
---
2020-02-14T10:08:15.0651288Z  finished in 2.237
2020-02-14T10:08:15.0822344Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-14T10:08:15.2304506Z 
2020-02-14T10:08:15.2305674Z running 9 tests
2020-02-14T10:08:15.2306669Z iiiiiiiii
2020-02-14T10:08:15.2307484Z 
2020-02-14T10:08:15.2307729Z  finished in 0.148
2020-02-14T10:08:15.2502283Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-14T10:08:15.4959453Z 
---
2020-02-14T10:08:36.3458412Z  finished in 21.095
2020-02-14T10:08:36.3724230Z Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-14T10:08:36.5600563Z 
2020-02-14T10:08:36.5640514Z running 116 tests
2020-02-14T10:08:50.9300334Z iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii..........i.....i..i.......ii.i.ii. 100/116
2020-02-14T10:08:53.4768740Z ....iiii.....ii.
2020-02-14T10:08:53.4770062Z 
2020-02-14T10:08:53.4770641Z  finished in 16.476
2020-02-14T10:08:53.4776163Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-14T10:08:53.4786320Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2020-02-14T10:22:46.7961945Z 
2020-02-14T10:22:46.7976123Z    Doc-tests core
2020-02-14T10:22:51.7880334Z 
2020-02-14T10:22:51.7881305Z running 2471 tests
2020-02-14T10:23:01.0426851Z ......iiiii......................................................................................... 100/2471
2020-02-14T10:23:10.3894068Z ..................................................................................ii................ 200/2471
2020-02-14T10:23:32.0087776Z .................i.................................................................................. 400/2471
2020-02-14T10:23:32.0087776Z .................i.................................................................................. 400/2471
2020-02-14T10:23:41.8510105Z ......................................................................i..i..................iiii.... 500/2471
2020-02-14T10:23:58.9923794Z .................................................................................................... 700/2471
2020-02-14T10:24:07.8628629Z .................................................................................................... 800/2471
2020-02-14T10:24:16.6719133Z .................................................................................................... 900/2471
2020-02-14T10:24:25.4786859Z .................................................................................................... 1000/2471
---
2020-02-14T10:28:08.7354735Z 
2020-02-14T10:28:08.7355026Z running 1009 tests
2020-02-14T10:28:27.4182552Z i................................................................................................... 100/1009
2020-02-14T10:28:36.7308525Z .................................................................................................... 200/1009
2020-02-14T10:28:43.9411891Z ..................iii......i......i...i......i...................................................... 300/1009
2020-02-14T10:28:48.9511851Z .................................................................................................... 400/1009
2020-02-14T10:28:55.6617997Z ............................................i..i.....................................ii............. 500/1009
2020-02-14T10:29:08.1072869Z .................................................................................................... 700/1009
2020-02-14T10:29:08.1072869Z .................................................................................................... 700/1009
2020-02-14T10:29:14.7281697Z ...................................iiii............................................................. 800/1009
2020-02-14T10:29:29.1034033Z .................................................................................................... 900/1009
2020-02-14T10:29:36.0097548Z .........................................................iiii....................................... 1000/1009
2020-02-14T10:29:36.3793261Z test result: ok. 989 passed; 0 failed; 20 ignored; 0 measured; 0 filtered out
2020-02-14T10:29:36.3793425Z 
2020-02-14T10:29:36.3933287Z  finished in 170.045
2020-02-14T10:29:36.3947081Z Testing term stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-02-14T10:48:22.7146180Z     Checking backtrace v0.3.44
2020-02-14T10:48:24.9340846Z     Checking rustc-std-workspace-alloc v1.99.0 (/checkout/src/tools/rustc-std-workspace-alloc)
2020-02-14T10:48:24.9371161Z     Checking panic_unwind v0.0.0 (/checkout/src/libpanic_unwind)
2020-02-14T10:48:25.7822572Z  Documenting std v0.0.0 (/checkout/src/libstd)
2020-02-14T10:48:30.9887362Z error: `[source]` cannot be resolved, ignoring it.
2020-02-14T10:48:30.9891536Z    --> src/libstd/error.rs:219:30
2020-02-14T10:48:30.9892792Z 219 |     /// recursively calling [`source`].
2020-02-14T10:48:30.9893483Z     |                              ^^^^^^^^ cannot be resolved, ignoring
2020-02-14T10:48:30.9894295Z     |
2020-02-14T10:48:30.9894821Z note: the lint level is defined here
2020-02-14T10:48:30.9894821Z note: the lint level is defined here
2020-02-14T10:48:30.9895365Z    --> src/libstd/lib.rs:211:9
2020-02-14T10:48:30.9895855Z     |
2020-02-14T10:48:30.9897074Z 211 | #![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings
2020-02-14T10:48:30.9898257Z     = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
2020-02-14T10:48:30.9898432Z 
2020-02-14T10:48:30.9898432Z 
2020-02-14T10:48:30.9905662Z error: `[source]` cannot be resolved, ignoring it.
2020-02-14T10:48:30.9906207Z    --> src/libstd/error.rs:219:30
2020-02-14T10:48:30.9907056Z 219 |     /// recursively calling [`source`].
2020-02-14T10:48:30.9907556Z     |                              ^^^^^^^^ cannot be resolved, ignoring
2020-02-14T10:48:30.9907933Z     |
2020-02-14T10:48:30.9908442Z     = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
2020-02-14T10:48:30.9908442Z     = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
2020-02-14T10:48:30.9908609Z 
2020-02-14T10:48:31.0404890Z error: `[source]` cannot be resolved, ignoring it.
2020-02-14T10:48:31.0406046Z    --> src/libstd/error.rs:229:30
2020-02-14T10:48:31.0407183Z 229 |     /// recursively calling [`source`].
2020-02-14T10:48:31.0407669Z     |                              ^^^^^^^^ cannot be resolved, ignoring
2020-02-14T10:48:31.0408032Z     |
2020-02-14T10:48:31.0408498Z     = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
2020-02-14T10:48:31.0408498Z     = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
2020-02-14T10:48:31.0408654Z 
2020-02-14T10:48:31.3094005Z error: aborting due to 3 previous errors
2020-02-14T10:48:31.3094718Z 
2020-02-14T10:48:31.3307461Z error: Could not document `std`.
2020-02-14T10:48:31.3308011Z 
2020-02-14T10:48:31.3308244Z Caused by:
2020-02-14T10:48:31.3311777Z   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustdoc --edition=2018 --crate-type dylib --crate-type rlib --crate-name std src/libstd/lib.rs --target x86_64-unknown-linux-gnu -o /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-linux-gnu/doc --cfg 'feature="backtrace"' --cfg 'feature="compiler-builtins-c"' --cfg 'feature="default"' --cfg 'feature="panic_unwind"' --cfg 'feature="std_detect_dlsym_getauxval"' --cfg 'feature="std_detect_file_io"' --error-format=json --json=diagnostic-rendered-ansi --markdown-css rust.css --markdown-no-toc --generate-redirect-pages --resource-suffix 1.43.0 --index-page /checkout/src/doc/index.md -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/release/deps --extern alloc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-linux-gnu/release/deps/liballoc-f2c2ee531bd8be59.rmeta --extern backtrace_rs=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-linux-gnu/release/deps/libbacktrace-512bbd4bd20314cc.rmeta --extern cfg_if=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-linux-gnu/release/deps/libcfg_if-647ef3970fb37342.rmeta --extern compiler_builtins=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-ae5970a4fd29f03e.rmeta --extern core=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-linux-gnu/release/deps/libcore-44b33b5768502e3e.rmeta --extern hashbrown=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-linux-gnu/release/deps/libhashbrown-2b45fd7c7cead493.rmeta --extern libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-linux-gnu/release/deps/liblibc-430f3e5776f8af9c.rmeta --extern panic_abort=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-linux-gnu/release/deps/libpanic_abort-cf44ab04c1a76b90.rmeta --extern panic_unwind=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-linux-gnu/release/deps/libpanic_unwind-d69ab35c94b5f557.rmeta --extern unwind=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-linux-gnu/release/deps/libunwind-881400b15301aa72.rmeta` (exit code: 1)
2020-02-14T10:48:31.3334214Z 
2020-02-14T10:48:31.3334214Z 
2020-02-14T10:48:31.3337589Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustdoc" "-Zconfig-profile" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "2" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/checkout/src/libtest/Cargo.toml" "-Z" "unstable-options" "-p" "std" "--" "--markdown-css" "rust.css" "--markdown-no-toc" "--generate-redirect-pages" "--resource-suffix" "1.43.0" "--index-page" "/checkout/src/doc/index.md"
2020-02-14T10:48:31.3338384Z 
2020-02-14T10:48:31.3338538Z 
2020-02-14T10:48:31.3338781Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2020-02-14T10:48:31.3338952Z Build completed unsuccessfully in 1:47:43
2020-02-14T10:48:31.3338952Z Build completed unsuccessfully in 1:47:43
2020-02-14T10:48:31.3384010Z == clock drift check ==
2020-02-14T10:48:31.3406963Z   local time: Fri Feb 14 10:48:31 UTC 2020
2020-02-14T10:48:31.4962417Z   network time: Fri, 14 Feb 2020 10:48:31 GMT
2020-02-14T10:48:31.4968794Z == end clock drift check ==
2020-02-14T10:48:34.2584289Z 
2020-02-14T10:48:34.2707423Z ##[error]Bash exited with code '1'.
2020-02-14T10:48:34.2721797Z ##[section]Finishing: Run build
2020-02-14T10:48:34.2744634Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69163/merge to s
2020-02-14T10:48:34.2746974Z Task         : Get sources
2020-02-14T10:48:34.2747049Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-14T10:48:34.2747124Z Version      : 1.0.0
2020-02-14T10:48:34.2747172Z Author       : Microsoft
2020-02-14T10:48:34.2747172Z Author       : Microsoft
2020-02-14T10:48:34.2747246Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-02-14T10:48:34.2747303Z ==============================================================================
2020-02-14T10:48:34.7484353Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-02-14T10:48:34.7523233Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/69163/merge to s
2020-02-14T10:48:34.7629892Z Cleaning up task key
2020-02-14T10:48:34.7630646Z Start cleaning up orphan processes.
2020-02-14T10:48:34.7731699Z Terminate orphan process: pid (3889) (python)
2020-02-14T10:48:34.7995710Z ##[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 @TimNN. (Feature Requests)

@rust-highfive
Copy link
Contributor

The job x86_64-gnu-llvm-7 of 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-02-14T12:05:32.7401133Z ========================== Starting Command Output ===========================
2020-02-14T12:05:32.7402568Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/e8757c02-f7c0-49fe-8eeb-81c2e86844c2.sh
2020-02-14T12:05:32.7402606Z 
2020-02-14T12:05:32.7405878Z ##[section]Finishing: Disable git automatic line ending conversion
2020-02-14T12:05:32.7469334Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69163/merge to s
2020-02-14T12:05:32.7471456Z Task         : Get sources
2020-02-14T12:05:32.7471492Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-14T12:05:32.7471525Z Version      : 1.0.0
2020-02-14T12:05:32.7471575Z Author       : Microsoft
---
2020-02-14T12:05:33.8174048Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-02-14T12:05:33.8185594Z ##[command]git config gc.auto 0
2020-02-14T12:05:33.8187930Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-02-14T12:05:33.8189701Z ##[command]git config --get-all http.proxy
2020-02-14T12:05:33.8197884Z ##[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/69163/merge:refs/remotes/pull/69163/merge
---
2020-02-14T13:10:37.2692752Z .................................................................................................... 1700/9637
2020-02-14T13:10:42.3747799Z .................................................................................................... 1800/9637
2020-02-14T13:10:55.1369557Z ..............................i..................................................................... 1900/9637
2020-02-14T13:11:03.1434044Z .................................................................................................... 2000/9637
2020-02-14T13:11:18.7376284Z ....................iiiii........................................................................... 2100/9637
2020-02-14T13:11:29.1744743Z .................................................................................................... 2300/9637
2020-02-14T13:11:31.7311053Z .................................................................................................... 2400/9637
2020-02-14T13:11:36.7549409Z .................................................................................................... 2500/9637
2020-02-14T13:11:59.6193660Z .................................................................................................... 2600/9637
---
2020-02-14T13:14:46.0491033Z ........................................................................i...............i........... 4900/9637
2020-02-14T13:14:54.1720635Z .................................................................................................... 5000/9637
2020-02-14T13:15:03.0505240Z .................................................................................................... 5100/9637
2020-02-14T13:15:08.0179805Z ..............i..................................................................................... 5200/9637
2020-02-14T13:15:19.9243495Z ........................................................................................ii.ii....... 5300/9637
2020-02-14T13:15:24.2827490Z .i...i.............................................................................................. 5400/9637
2020-02-14T13:15:35.2150732Z .................................................................................................... 5600/9637
2020-02-14T13:15:45.8729690Z .............................................................................i...................... 5700/9637
2020-02-14T13:15:53.8816956Z .................................................................................................... 5800/9637
2020-02-14T13:16:00.4836366Z ...........................................................................i........................ 5900/9637
2020-02-14T13:16:00.4836366Z ...........................................................................i........................ 5900/9637
2020-02-14T13:16:10.8879810Z .....................................................................ii...i..ii...........i......... 6000/9637
2020-02-14T13:16:33.6507783Z .................................................................................................... 6200/9637
2020-02-14T13:16:41.5190473Z .................................................................................................... 6300/9637
2020-02-14T13:16:49.2467773Z .................................................................................................i.. 6400/9637
2020-02-14T13:17:03.4125158Z ii.................................................................................................. 6500/9637
---
2020-02-14T13:19:16.3931401Z .................................................................................................... 7600/9637
2020-02-14T13:19:20.9807693Z .................................................................................................... 7700/9637
2020-02-14T13:19:27.5525616Z .................................................................................................... 7800/9637
2020-02-14T13:19:36.0894944Z .................................................................................................... 7900/9637
2020-02-14T13:19:45.3429915Z ............................................................................iiiiiii.i............... 8000/9637
2020-02-14T13:20:02.7693241Z ................i......i............................................................................ 8200/9637
2020-02-14T13:20:08.5714745Z .................................................................................................... 8300/9637
2020-02-14T13:20:22.5536138Z .................................................................................................... 8400/9637
2020-02-14T13:20:33.0313106Z .................................................................................................... 8500/9637
---
2020-02-14T13:23:08.9913512Z  finished in 7.649
2020-02-14T13:23:09.0121756Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-14T13:23:09.1997578Z 
2020-02-14T13:23:09.2000050Z running 178 tests
2020-02-14T13:23:12.3013707Z iiii......i...........ii..iiii...i....i...........i............i..i..................i....i......... 100/178
2020-02-14T13:23:14.7843377Z ...i.i.i...iii..iiiiiiiiiiiiiiii.......................iii............ii......
2020-02-14T13:23:14.7845557Z 
2020-02-14T13:23:14.7850011Z  finished in 5.773
2020-02-14T13:23:14.8049330Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-14T13:23:14.9879688Z 
---
2020-02-14T13:23:17.0142655Z  finished in 2.208
2020-02-14T13:23:17.0341637Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-14T13:23:17.2050558Z 
2020-02-14T13:23:17.2050830Z running 9 tests
2020-02-14T13:23:17.2051966Z iiiiiiiii
2020-02-14T13:23:17.2052727Z 
2020-02-14T13:23:17.2054646Z  finished in 0.170
2020-02-14T13:23:17.2255182Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-14T13:23:17.3974914Z 
---
2020-02-14T13:23:38.7565195Z  finished in 21.531
2020-02-14T13:23:38.7810798Z Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-14T13:23:38.9547270Z 
2020-02-14T13:23:38.9550322Z running 116 tests
2020-02-14T13:23:53.3789466Z iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii..........i.....i..i.......ii.i.ii. 100/116
2020-02-14T13:23:55.3680716Z ....iiii.....ii.
2020-02-14T13:23:55.3681154Z 
2020-02-14T13:23:55.3683701Z  finished in 16.587
2020-02-14T13:23:55.3690348Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-14T13:23:55.3691008Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2020-02-14T13:38:27.6097838Z 
2020-02-14T13:38:27.6098874Z    Doc-tests core
2020-02-14T13:38:32.7627325Z 
2020-02-14T13:38:32.7628023Z running 2471 tests
2020-02-14T13:38:42.2928241Z ......iiiii......................................................................................... 100/2471
2020-02-14T13:38:51.6010802Z ..................................................................................ii................ 200/2471
2020-02-14T13:39:14.3200861Z .................i.................................................................................. 400/2471
2020-02-14T13:39:14.3200861Z .................i.................................................................................. 400/2471
2020-02-14T13:39:24.4347415Z ......................................................................i..i..................iiii.... 500/2471
2020-02-14T13:39:41.6217647Z .................................................................................................... 700/2471
2020-02-14T13:39:50.4510925Z .................................................................................................... 800/2471
2020-02-14T13:39:59.2923137Z .................................................................................................... 900/2471
2020-02-14T13:40:08.3018846Z .................................................................................................... 1000/2471
---
2020-02-14T13:43:46.5280110Z .................................................................................................... 500/760
2020-02-14T13:43:46.5564486Z .................thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:2741:22
2020-02-14T13:43:46.5586610Z ....thread 'thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:2778:21
2020-02-14T13:43:46.5590934Z <unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', src/libstd/sync/mpsc/mod.rs:2766:17
2020-02-14T13:43:46.5641503Z .......thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError..', src/libstd/sync/mpsc/mod.rs:2645:13
2020-02-14T13:43:46.7576964Z ........................................thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:1997:22
2020-02-14T13:43:46.7601196Z ....thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:2034:21
2020-02-14T13:43:46.7638130Z .......thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:1916:13
2020-02-14T13:43:48.8117257Z ........................thread '<unnamed>' panicked at 'explicit panic', src/libstd/sync/mutex.rs:633:13
2020-02-14T13:43:48.8117680Z thread '<unnamed>' panicked at 'test panic in inner thread to poison mutex', src/libstd/sync/mutex.rs:587:13
2020-02-14T13:43:48.8118005Z thread '<unnamed>' panicked at 'test panic in inner thread to poison mutex', src/libstd/sync/mutex.rs:563:13
2020-02-14T13:43:48.8118271Z thread '<unnamed>' panicked at 'explicit panic', src/libstd/sync/mutex.rs:694:13
---
2020-02-14T13:43:57.8538788Z 
2020-02-14T13:43:57.8539499Z running 1009 tests
2020-02-14T13:44:17.4932554Z i................................................................................................... 100/1009
2020-02-14T13:44:28.2241608Z .................................................................................................... 200/1009
2020-02-14T13:44:35.7231091Z ..................iii......i......i...i......i...................................................... 300/1009
2020-02-14T13:44:41.0336919Z .................................................................................................... 400/1009
2020-02-14T13:44:48.1529596Z ............................................i..i.....................................ii............. 500/1009
2020-02-14T13:45:01.5515716Z .................................................................................................... 700/1009
2020-02-14T13:45:01.5515716Z .................................................................................................... 700/1009
2020-02-14T13:45:08.6731817Z ...................................iiii............................................................. 800/1009
2020-02-14T13:45:23.7174450Z .................................................................................................... 900/1009
2020-02-14T13:45:30.9707093Z .........................................................iiii....................................... 1000/1009
2020-02-14T13:45:31.3779128Z test result: ok. 989 passed; 0 failed; 20 ignored; 0 measured; 0 filtered out
2020-02-14T13:45:31.3779244Z 
2020-02-14T13:45:31.3911441Z  finished in 181.199
2020-02-14T13:45:31.3924973Z Testing term stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-02-14T14:06:19.2290612Z Rustbook (x86_64-unknown-linux-gnu) - edition-guide
2020-02-14T14:06:19.6766684Z Building stage0 tool linkchecker (x86_64-unknown-linux-gnu)
2020-02-14T14:06:19.8487488Z    Compiling linkchecker v0.1.0 (/checkout/src/tools/linkchecker)
2020-02-14T14:06:21.5612715Z     Finished release [optimized] target(s) in 1.88s
2020-02-14T14:06:25.0445130Z std/sync/mpsc/struct.RecvError.html:23: broken link - std/sync/mpsc/trait.Error.html
2020-02-14T14:06:25.0471973Z std/sync/mpsc/enum.TryRecvError.html:30: broken link - std/sync/mpsc/trait.Error.html
2020-02-14T14:06:25.0493447Z std/sync/mpsc/enum.RecvTimeoutError.html:30: broken link - std/sync/mpsc/trait.Error.html
2020-02-14T14:06:25.0629125Z std/sync/mpsc/enum.TrySendError.html:31: broken link - std/sync/mpsc/trait.Error.html
2020-02-14T14:06:25.0650771Z std/sync/mpsc/struct.SendError.html:22: broken link - std/sync/mpsc/trait.Error.html
2020-02-14T14:06:25.1213670Z std/sync/struct.PoisonError.html:67: broken link - std/sync/trait.Error.html
2020-02-14T14:06:25.1245025Z std/sync/enum.TryLockError.html:25: broken link - std/sync/trait.Error.html
2020-02-14T14:06:25.1798675Z std/boxed/struct.Box.html:637: broken link - std/boxed/trait.Error.html
2020-02-14T14:06:25.1845710Z std/string/struct.FromUtf8Error.html:77: broken link - std/string/trait.Error.html
2020-02-14T14:06:25.1935960Z std/string/struct.FromUtf16Error.html:23: broken link - std/string/trait.Error.html
2020-02-14T14:06:25.2739644Z std/char/struct.ParseCharError.html:17: broken link - std/char/trait.Error.html
2020-02-14T14:06:25.2826634Z std/char/struct.CharTryFromError.html:17: broken link - std/char/trait.Error.html
2020-02-14T14:06:25.2912433Z std/char/struct.DecodeUtf16Error.html:18: broken link - std/char/trait.Error.html
2020-02-14T14:06:25.4201324Z std/ffi/struct.NulError.html:46: broken link - std/ffi/trait.Error.html
2020-02-14T14:06:25.4345993Z std/ffi/struct.IntoStringError.html:26: broken link - std/ffi/trait.Error.html
2020-02-14T14:06:25.4408805Z std/ffi/struct.FromBytesWithNulError.html:27: broken link - std/ffi/trait.Error.html
2020-02-14T14:06:25.5133855Z std/convert/enum.Infallible.html:66: broken link - std/convert/trait.Error.html
2020-02-14T14:06:26.2796469Z std/str/struct.Utf8Error.html:83: broken link - std/str/trait.Error.html
2020-02-14T14:06:26.2813624Z std/str/struct.ParseBoolError.html:17: broken link - std/str/trait.Error.html
2020-02-14T14:06:26.4701741Z std/fmt/struct.Error.html:51: broken link - std/fmt/trait.Error.html
2020-02-14T14:06:26.5491780Z std/cell/struct.BorrowError.html:13: broken link - std/cell/trait.Error.html
2020-02-14T14:06:26.5504033Z std/cell/struct.BorrowMutError.html:13: broken link - std/cell/trait.Error.html
2020-02-14T14:06:26.6382648Z std/thread/struct.AccessError.html:17: broken link - std/thread/trait.Error.html
2020-02-14T14:06:26.9541250Z std/net/struct.AddrParseError.html:34: broken link - std/net/trait.Error.html
2020-02-14T14:06:27.3460253Z std/time/struct.SystemTimeError.html:46: broken link - std/time/trait.Error.html
2020-02-14T14:06:27.3558225Z std/array/struct.TryFromSliceError.html:16: broken link - std/array/trait.Error.html
2020-02-14T14:06:27.4673982Z std/io/struct.Error.html:204: broken link - std/io/trait.Error.html
2020-02-14T14:06:27.5195757Z std/io/struct.IntoInnerError.html:84: broken link - std/io/trait.Error.html
2020-02-14T14:06:27.5982273Z std/path/struct.StripPrefixError.html:20: broken link - std/path/trait.Error.html
2020-02-14T14:06:27.7529889Z std/num/struct.TryFromIntError.html:19: broken link - std/num/trait.Error.html
2020-02-14T14:06:27.7584272Z std/num/struct.ParseIntError.html:25: broken link - std/num/trait.Error.html
2020-02-14T14:06:27.7606109Z std/num/struct.ParseFloatError.html:19: broken link - std/num/trait.Error.html
2020-02-14T14:06:27.9180881Z std/alloc/struct.AllocErr.html:21: broken link - std/alloc/trait.Error.html
2020-02-14T14:06:27.9227861Z std/alloc/struct.LayoutErr.html:20: broken link - std/alloc/trait.Error.html
2020-02-14T14:06:27.9249446Z std/alloc/struct.CannotReallocInPlace.html:20: broken link - std/alloc/trait.Error.html
2020-02-14T14:06:27.9551391Z std/env/struct.JoinPathsError.html:14: broken link - std/env/trait.Error.html
2020-02-14T14:06:27.9640207Z std/env/enum.VarError.html:28: broken link - std/env/trait.Error.html
2020-02-14T14:06:29.6910346Z thread 'main' panicked at 'found some broken links', src/tools/linkchecker/main.rs:43:9
2020-02-14T14:06:29.6948243Z 
2020-02-14T14:06:29.6948543Z 
2020-02-14T14:06:29.6949291Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/linkchecker" "/checkout/obj/build/x86_64-unknown-linux-gnu/doc"
2020-02-14T14:06:29.6949563Z expected success, got: exit code: 101
---
2020-02-14T14:06:29.7054280Z   local time: Fri Feb 14 14:06:29 UTC 2020
2020-02-14T14:06:29.8720379Z   network time: Fri, 14 Feb 2020 14:06:29 GMT
2020-02-14T14:06:29.8721498Z == end clock drift check ==
2020-02-14T14:06:31.7178944Z 
2020-02-14T14:06:31.7288219Z ##[error]Bash exited with code '1'.
2020-02-14T14:06:31.7304061Z ##[section]Finishing: Run build
2020-02-14T14:06:31.7329583Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69163/merge to s
2020-02-14T14:06:31.7331628Z Task         : Get sources
2020-02-14T14:06:31.7331676Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-14T14:06:31.7331722Z Version      : 1.0.0
2020-02-14T14:06:31.7331782Z Author       : Microsoft
2020-02-14T14:06:31.7331782Z Author       : Microsoft
2020-02-14T14:06:31.7331830Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-02-14T14:06:31.7331880Z ==============================================================================
2020-02-14T14:06:32.2193251Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-02-14T14:06:32.2246554Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/69163/merge to s
2020-02-14T14:06:32.2373497Z Cleaning up task key
2020-02-14T14:06:32.2374256Z Start cleaning up orphan processes.
2020-02-14T14:06:32.2481621Z Terminate orphan process: pid (4087) (python)
2020-02-14T14:06:32.3239497Z ##[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 @TimNN. (Feature Requests)

@rust-highfive
Copy link
Contributor

The job x86_64-gnu-llvm-7 of 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-02-17T16:06:40.8392298Z ========================== Starting Command Output ===========================
2020-02-17T16:06:40.8692177Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/e1df4455-ab71-427a-b331-ceb20f1ac219.sh
2020-02-17T16:06:40.8692231Z 
2020-02-17T16:06:40.8695946Z ##[section]Finishing: Disable git automatic line ending conversion
2020-02-17T16:06:40.8701375Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69163/merge to s
2020-02-17T16:06:40.8703560Z Task         : Get sources
2020-02-17T16:06:40.8703608Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-17T16:06:40.8703637Z Version      : 1.0.0
2020-02-17T16:06:40.8703666Z Author       : Microsoft
---
2020-02-17T16:06:41.7508790Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-02-17T16:06:41.7607288Z ##[command]git config gc.auto 0
2020-02-17T16:06:41.7679665Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-02-17T16:06:41.7733897Z ##[command]git config --get-all http.proxy
2020-02-17T16:06:41.7865015Z ##[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/69163/merge:refs/remotes/pull/69163/merge
---
2020-02-17T17:03:40.4195815Z .................................................................................................... 1700/9650
2020-02-17T17:03:44.8180715Z .................................................................................................... 1800/9650
2020-02-17T17:03:55.4915617Z ..................................i................................................................. 1900/9650
2020-02-17T17:04:02.4326634Z .................................................................................................... 2000/9650
2020-02-17T17:04:15.2273594Z ........................iiiii....................................................................... 2100/9650
2020-02-17T17:04:23.9322100Z .................................................................................................... 2300/9650
2020-02-17T17:04:26.0636155Z .................................................................................................... 2400/9650
2020-02-17T17:04:30.1719501Z .................................................................................................... 2500/9650
2020-02-17T17:04:48.7697439Z .................................................................................................... 2600/9650
---
2020-02-17T17:07:45.7642374Z .................................................................................................... 5600/9650
2020-02-17T17:07:54.9044185Z .......................................................................................i............ 5700/9650
2020-02-17T17:08:01.9201192Z .................................................................................................... 5800/9650
2020-02-17T17:08:06.7221167Z .....................................................................................i.............. 5900/9650
2020-02-17T17:08:15.4825433Z ..............................................................................ii...i..ii...........i 6000/9650
2020-02-17T17:08:35.5804683Z .................................................................................................... 6200/9650
2020-02-17T17:08:42.4910207Z .................................................................................................... 6300/9650
2020-02-17T17:08:49.7142609Z .................................................................................................... 6400/9650
2020-02-17T17:08:49.7142609Z .................................................................................................... 6400/9650
2020-02-17T17:09:03.6086062Z ......i..ii......................................................................................... 6500/9650
2020-02-17T17:09:21.9863009Z ..............................................................................................i..... 6700/9650
2020-02-17T17:09:23.9181149Z .................................................................................................... 6800/9650
2020-02-17T17:09:25.8783111Z .................................................................................................... 6900/9650
2020-02-17T17:09:28.0029999Z .....i.............................................................................................. 7000/9650
---
2020-02-17T17:10:54.1495293Z .................................................................................................... 7600/9650
2020-02-17T17:10:58.4643533Z .................................................................................................... 7700/9650
2020-02-17T17:11:04.0329887Z .................................................................................................... 7800/9650
2020-02-17T17:11:10.1256972Z .................................................................................................... 7900/9650
2020-02-17T17:11:18.8708746Z .......................................................................................iiiiiii.i.... 8000/9650
2020-02-17T17:11:33.5993798Z ...........................i......i................................................................. 8200/9650
2020-02-17T17:11:38.1156091Z .................................................................................................... 8300/9650
2020-02-17T17:11:48.4956305Z .................................................................................................... 8400/9650
2020-02-17T17:11:59.5133416Z .................................................................................................... 8500/9650
---
2020-02-17T17:14:11.3506237Z  finished in 6.970
2020-02-17T17:14:11.3693340Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-17T17:14:11.5562816Z 
2020-02-17T17:14:11.5562937Z running 178 tests
2020-02-17T17:14:14.3469852Z iiii......i...........ii..iiii...i....i...........i............i..i..................i....i......... 100/178
2020-02-17T17:14:17.3447350Z ...i.i.i...iii..iiiiiiiiiiiiiiii.......................iii............ii......
2020-02-17T17:14:17.3504093Z 
2020-02-17T17:14:17.3504160Z  finished in 5.081
2020-02-17T17:14:17.3504439Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-17T17:14:17.3504473Z 
---
2020-02-17T17:14:18.4277578Z  finished in 1.962
2020-02-17T17:14:18.4444353Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-17T17:14:18.5977146Z 
2020-02-17T17:14:18.5977372Z running 9 tests
2020-02-17T17:14:18.5978383Z iiiiiiiii
2020-02-17T17:14:18.5978724Z 
2020-02-17T17:14:18.5979985Z  finished in 0.153
2020-02-17T17:14:18.6144165Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-17T17:14:19.3495993Z 
---
2020-02-17T17:14:38.1243980Z  finished in 19.510
2020-02-17T17:14:38.1402358Z Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-17T17:14:38.2952131Z 
2020-02-17T17:14:38.2955825Z running 116 tests
2020-02-17T17:14:50.9344932Z iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii..........i.....i..i.......ii.i.ii. 100/116
2020-02-17T17:14:52.8453662Z ....iiii.....ii.
2020-02-17T17:14:52.8455387Z 
2020-02-17T17:14:52.8456552Z  finished in 14.705
2020-02-17T17:14:52.8461624Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-17T17:14:52.8462289Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2020-02-17T17:27:13.6709318Z 
2020-02-17T17:27:13.6710025Z    Doc-tests core
2020-02-17T17:27:18.2788994Z 
2020-02-17T17:27:18.2790427Z running 2471 tests
2020-02-17T17:27:27.0786063Z ......iiiii......................................................................................... 100/2471
2020-02-17T17:27:35.9830151Z ..................................................................................ii................ 200/2471
2020-02-17T17:27:56.7743826Z .................i.................................................................................. 400/2471
2020-02-17T17:27:56.7743826Z .................i.................................................................................. 400/2471
2020-02-17T17:28:06.3812324Z ......................................................................i..i..................iiii.... 500/2471
2020-02-17T17:28:23.2115099Z .................................................................................................... 700/2471
2020-02-17T17:28:31.9475016Z .................................................................................................... 800/2471
2020-02-17T17:28:40.7467770Z .................................................................................................... 900/2471
2020-02-17T17:28:49.5658830Z .................................................................................................... 1000/2471
---
2020-02-17T17:32:15.7238623Z .................................................................................................... 500/760
2020-02-17T17:32:15.7556970Z .................thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:2741:22
2020-02-17T17:32:15.7573372Z ....thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', src/libstd/sync/mpsc/mod.rs:2766:17
2020-02-17T17:32:15.7577591Z thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:2778:21
2020-02-17T17:32:15.7612959Z ........thread '..<unnamed>' panicked at '.called `Result::unwrap()` on an `Err` value: RecvError.', .src/libstd/sync/mpsc/mod.rs.:.2645.:13.
2020-02-17T17:32:16.0112916Z ..................................thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:1997:22
2020-02-17T17:32:16.0130175Z ...thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', src/libstd/sync/mpsc/mod.rs:2022:17
2020-02-17T17:32:16.0139028Z ..thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:2034:21
2020-02-17T17:32:16.0157074Z ....thread '.<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:1916:13
2020-02-17T17:32:18.0529238Z ....................thread '<unnamed>' panicked at 'explicit panic', src/libstd/sync/mutex.rs:633:13
2020-02-17T17:32:18.0538568Z .thread '<unnamed>' panicked at 'test panic in inner thread to poison mutex', src/libstd/sync/mutex.rs:587:13
2020-02-17T17:32:18.0546970Z ...thread '<unnamed>' panicked at 'test panic in inner thread to poison mutex', src/libstd/sync/mutex.rs:563:13
2020-02-17T17:32:18.0556040Z .thread '<unnamed>' panicked at 'explicit panic', src/libstd/sync/mutex.rs:694:13
---
2020-02-17T17:32:27.2334588Z 
2020-02-17T17:32:27.2335138Z running 1009 tests
2020-02-17T17:32:44.3451877Z i................................................................................................... 100/1009
2020-02-17T17:32:53.9707273Z .................................................................................................... 200/1009
2020-02-17T17:33:00.5879878Z ..................iii......i......i...i......i...................................................... 300/1009
2020-02-17T17:33:05.3603954Z .................................................................................................... 400/1009
2020-02-17T17:33:11.8751734Z ............................................i..i.....................................ii............. 500/1009
2020-02-17T17:33:24.1843195Z .................................................................................................... 700/1009
2020-02-17T17:33:24.1843195Z .................................................................................................... 700/1009
2020-02-17T17:33:30.7140999Z ...................................iiii............................................................. 800/1009
2020-02-17T17:33:43.9659688Z .................................................................................................... 900/1009
2020-02-17T17:33:50.4967963Z .........................................................iiii....................................... 1000/1009
2020-02-17T17:33:50.8613741Z test result: ok. 989 passed; 0 failed; 20 ignored; 0 measured; 0 filtered out
2020-02-17T17:33:50.8613814Z 
2020-02-17T17:33:50.8714886Z  finished in 161.547
2020-02-17T17:33:50.8725273Z Testing term stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-02-17T17:50:46.1745716Z Rustbook (x86_64-unknown-linux-gnu) - edition-guide
2020-02-17T17:50:46.5156651Z Building stage0 tool linkchecker (x86_64-unknown-linux-gnu)
2020-02-17T17:50:46.6375690Z    Compiling linkchecker v0.1.0 (/checkout/src/tools/linkchecker)
2020-02-17T17:50:47.9066774Z     Finished release [optimized] target(s) in 1.38s
2020-02-17T17:50:51.7093950Z std/io/struct.IntoInnerError.html:84: broken link - std/io/trait.Error.html
2020-02-17T17:50:51.7408533Z std/io/struct.Error.html:204: broken link - std/io/trait.Error.html
2020-02-17T17:50:51.7459787Z std/array/struct.TryFromSliceError.html:16: broken link - std/array/trait.Error.html
2020-02-17T17:50:51.7626315Z std/convert/enum.Infallible.html:66: broken link - std/convert/trait.Error.html
2020-02-17T17:50:52.0537387Z std/alloc/struct.CannotReallocInPlace.html:20: broken link - std/alloc/trait.Error.html
2020-02-17T17:50:52.0573493Z std/alloc/struct.LayoutErr.html:20: broken link - std/alloc/trait.Error.html
2020-02-17T17:50:52.0598634Z std/alloc/struct.AllocErr.html:21: broken link - std/alloc/trait.Error.html
2020-02-17T17:50:52.3855363Z std/string/struct.FromUtf16Error.html:23: broken link - std/string/trait.Error.html
2020-02-17T17:50:52.3868475Z std/string/struct.FromUtf8Error.html:77: broken link - std/string/trait.Error.html
2020-02-17T17:50:52.4652997Z std/time/struct.SystemTimeError.html:46: broken link - std/time/trait.Error.html
2020-02-17T17:50:52.7174922Z std/thread/struct.AccessError.html:17: broken link - std/thread/trait.Error.html
2020-02-17T17:50:52.8203147Z std/num/struct.ParseFloatError.html:19: broken link - std/num/trait.Error.html
2020-02-17T17:50:52.8263666Z std/num/struct.TryFromIntError.html:19: broken link - std/num/trait.Error.html
2020-02-17T17:50:52.8279700Z std/num/struct.ParseIntError.html:25: broken link - std/num/trait.Error.html
2020-02-17T17:50:52.9370738Z std/sync/enum.TryLockError.html:25: broken link - std/sync/trait.Error.html
2020-02-17T17:50:52.9399092Z std/sync/struct.PoisonError.html:67: broken link - std/sync/trait.Error.html
2020-02-17T17:50:52.9476395Z std/sync/mpsc/struct.SendError.html:22: broken link - std/sync/mpsc/trait.Error.html
2020-02-17T17:50:52.9570420Z std/sync/mpsc/enum.TrySendError.html:31: broken link - std/sync/mpsc/trait.Error.html
2020-02-17T17:50:52.9602812Z std/sync/mpsc/enum.TryRecvError.html:30: broken link - std/sync/mpsc/trait.Error.html
2020-02-17T17:50:52.9622222Z std/sync/mpsc/enum.RecvTimeoutError.html:30: broken link - std/sync/mpsc/trait.Error.html
2020-02-17T17:50:52.9639425Z std/sync/mpsc/struct.RecvError.html:23: broken link - std/sync/mpsc/trait.Error.html
2020-02-17T17:50:53.0446989Z std/env/enum.VarError.html:28: broken link - std/env/trait.Error.html
2020-02-17T17:50:53.0780273Z std/env/struct.JoinPathsError.html:14: broken link - std/env/trait.Error.html
2020-02-17T17:50:53.1499904Z std/ffi/struct.IntoStringError.html:26: broken link - std/ffi/trait.Error.html
2020-02-17T17:50:53.1528058Z std/ffi/struct.FromBytesWithNulError.html:27: broken link - std/ffi/trait.Error.html
2020-02-17T17:50:53.1563526Z std/ffi/struct.NulError.html:46: broken link - std/ffi/trait.Error.html
2020-02-17T17:50:53.2379627Z std/str/struct.Utf8Error.html:83: broken link - std/str/trait.Error.html
2020-02-17T17:50:53.2762407Z std/str/struct.ParseBoolError.html:17: broken link - std/str/trait.Error.html
2020-02-17T17:50:53.3700248Z std/char/struct.ParseCharError.html:17: broken link - std/char/trait.Error.html
2020-02-17T17:50:53.3836354Z std/char/struct.DecodeUtf16Error.html:18: broken link - std/char/trait.Error.html
2020-02-17T17:50:53.3900763Z std/char/struct.CharTryFromError.html:17: broken link - std/char/trait.Error.html
2020-02-17T17:50:53.4346269Z std/path/struct.StripPrefixError.html:20: broken link - std/path/trait.Error.html
2020-02-17T17:50:53.9424000Z std/boxed/struct.Box.html:637: broken link - std/boxed/trait.Error.html
2020-02-17T17:50:53.9459132Z std/cell/struct.BorrowError.html:13: broken link - std/cell/trait.Error.html
2020-02-17T17:50:53.9535699Z std/cell/struct.BorrowMutError.html:13: broken link - std/cell/trait.Error.html
2020-02-17T17:50:54.0347133Z std/fmt/struct.Error.html:51: broken link - std/fmt/trait.Error.html
2020-02-17T17:50:54.0445093Z std/net/struct.AddrParseError.html:34: broken link - std/net/trait.Error.html
2020-02-17T17:50:54.3687487Z thread 'main' panicked at 'found some broken links', src/tools/linkchecker/main.rs:43:9
2020-02-17T17:50:54.3717303Z 
2020-02-17T17:50:54.3717374Z 
2020-02-17T17:50:54.3717855Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/linkchecker" "/checkout/obj/build/x86_64-unknown-linux-gnu/doc"
2020-02-17T17:50:54.3717965Z expected success, got: exit code: 101
---
2020-02-17T17:50:54.5881568Z   local time: Mon Feb 17 17:50:54 UTC 2020
2020-02-17T17:50:54.8723404Z   network time: Mon, 17 Feb 2020 17:50:54 GMT
2020-02-17T17:50:54.8723868Z == end clock drift check ==
2020-02-17T17:50:56.5949386Z 
2020-02-17T17:50:56.6030600Z ##[error]Bash exited with code '1'.
2020-02-17T17:50:56.6042871Z ##[section]Finishing: Run build
2020-02-17T17:50:56.6072172Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69163/merge to s
2020-02-17T17:50:56.6074260Z Task         : Get sources
2020-02-17T17:50:56.6074316Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-17T17:50:56.6074692Z Version      : 1.0.0
2020-02-17T17:50:56.6074726Z Author       : Microsoft
2020-02-17T17:50:56.6074726Z Author       : Microsoft
2020-02-17T17:50:56.6074781Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-02-17T17:50:56.6074824Z ==============================================================================
2020-02-17T17:50:56.9844802Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-02-17T17:50:56.9880734Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/69163/merge to s
2020-02-17T17:50:56.9982730Z Cleaning up task key
2020-02-17T17:50:56.9983383Z Start cleaning up orphan processes.
2020-02-17T17:50:57.0081175Z Terminate orphan process: pid (3317) (python)
2020-02-17T17:50:57.0765916Z ##[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 @TimNN. (Feature Requests)

Because `chain()` was only implemented for `dyn Error`, users had
to cast errors to a `&(dyn Error)` to use the `chain()` method.

```rust
    let mut iter = (&my_error as &(dyn Error)).chain();
    // or
    let mut iter = <dyn Error>::chain(&my_error);
    // or
    let mut iter = Error::chain(&my_error);
```

What I would liked to have is

```rust
pub trait Error: Debug + Display {
    fn source(&self) -> Option<&(dyn Error + 'static)> {
        None
    }

    fn chain(&self) -> Chain<'_> where Self: Sized + 'static {
        Chain {
            current: Some(self),
        }
    }
}

impl dyn Error + 'static {
    fn chain(&self) -> Chain<'_> {
        Chain {
            current: Some(self),
        }
    }
}
```

This doesn't work, because of:
rust-lang#69161

This patch introduces an ErrorChain trait, which accomplishes the
job and is implemented for `Error` and `dyn Error + 'static`.
@JelteF
Copy link
Contributor

JelteF commented Feb 29, 2020

I think it's very important to have chain as a method method call. Otherwise it will not be very useful to add more functionality to the Chain, because creating a Chain will require too much effort. So I fully support the idea of this PR. I would very much prefer #69161 to be fixed though, since I think it's much nicer not to have to import a separate trait to get access to this method.

@JelteF
Copy link
Contributor

JelteF commented Mar 9, 2020

@haraldh I figured out a way to get this to work, without requiring the ErrorChain trait to be added to the scope:
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=949ac10fa02c57adf23cb1c1f7352b10

It does trigger the warning added in #51443, but I guess it might be fine in this case. If not it seems reasonable to use this in nightly until #69161 is fixed.

@haraldh
Copy link
Contributor Author

haraldh commented Mar 9, 2020

@haraldh I figured out a way to get this to work, without requiring the ErrorChain trait to be added to the scope:
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=949ac10fa02c57adf23cb1c1f7352b10

It does trigger the warning added in #51443, but I guess it might be fine in this case. If not it seems reasonable to use this in nightly until #69161 is fixed.

cool, but I don't want everybody using Error to have this warning displayed. Is there any way to turn it off in this case?

@JelteF
Copy link
Contributor

JelteF commented Mar 9, 2020

I would expect this can be done by adding #[allow(where_clauses_object_safety)] somewhere. I cannot get it to work on the playground though without adding `#![allow(where_clauses_object_safety)] to the top of the file. Can you check if you can make it work in the actual rustc source? I expect it should work, since it looks like the warning is on the trait itself, not the usage of the trait.

@haraldh
Copy link
Contributor Author

haraldh commented Mar 9, 2020

I would expect this can be done by adding #[allow(where_clauses_object_safety)] somewhere. I cannot get it to work on the playground though without adding `#![allow(where_clauses_object_safety)] to the top of the file. Can you check if you can make it work in the actual rustc source? I expect it should work, since it looks like the warning is on the trait itself, not the usage of the trait.

If it doesn't work in the playground, I doubt it works without global disable.

@Dylan-DPC-zz
Copy link

r? @dtolnay

Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

I am interested in having a chain method that works better, but I would prefer not to add a new standard library trait just for this. I would instead like to see work on #69161 and then implement chain in the way you say you want in the PR description. A trait like this would only hamstring us once the method resolution issue is fixed.

@dtolnay dtolnay closed this Mar 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants