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

More de-abuse of TyKind::Error #71074

Closed
wants to merge 8 commits into from

Conversation

mark-i-m
Copy link
Member

r? @eddyb

Sorry, I feel pretty out of my depth here. I have no idea if what I'm doing is reasonable.

cc #70866

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 12, 2020
@mark-i-m
Copy link
Member Author

cc @Centril

@eddyb
Copy link
Member

eddyb commented Apr 12, 2020

Does .with_self_ty(tcx.types.dummy_object_self_type) not work?

@mark-i-m
Copy link
Member Author

@eddyb Ah, I didn't try it because it failed on the last PR. But let me do so now...

@rust-highfive
Copy link
Collaborator

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-04-12T20:07:16.1808045Z ========================== Starting Command Output ===========================
2020-04-12T20:07:16.1811798Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/f677ab38-904a-4499-9434-8cb2d50a0409.sh
2020-04-12T20:07:16.1812208Z 
2020-04-12T20:07:16.1816521Z ##[section]Finishing: Disable git automatic line ending conversion
2020-04-12T20:07:16.1836224Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/71074/merge to s
2020-04-12T20:07:16.1839508Z Task         : Get sources
2020-04-12T20:07:16.1839819Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-04-12T20:07:16.1840148Z Version      : 1.0.0
2020-04-12T20:07:16.1840353Z Author       : Microsoft
---
2020-04-12T20:07:17.4047224Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-04-12T20:07:17.4053106Z ##[command]git config gc.auto 0
2020-04-12T20:07:17.4056906Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-04-12T20:07:17.4060402Z ##[command]git config --get-all http.proxy
2020-04-12T20:07:17.4068036Z ##[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/71074/merge:refs/remotes/pull/71074/merge
---
2020-04-12T20:09:27.6947780Z Looks like docker image is the same as before, not uploading
2020-04-12T20:09:35.3998248Z [CI_JOB_NAME=x86_64-gnu-llvm-7]
2020-04-12T20:09:35.4413358Z [CI_JOB_NAME=x86_64-gnu-llvm-7]
2020-04-12T20:09:35.4437986Z == clock drift check ==
2020-04-12T20:09:35.4462672Z   local time: Sun Apr 12 20:09:35 UTC 2020
2020-04-12T20:09:35.5196958Z   network time: Sun, 12 Apr 2020 20:09:35 GMT
2020-04-12T20:09:35.5224922Z Starting sccache server...
2020-04-12T20:09:35.6109293Z configure: processing command line
2020-04-12T20:09:35.6109533Z configure: 
2020-04-12T20:09:35.6110450Z configure: rust.dist-src        := False
---
2020-04-12T20:14:33.9482441Z    Compiling rustc_feature v0.0.0 (/checkout/src/librustc_feature)
2020-04-12T20:14:35.3087664Z    Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2020-04-12T20:14:36.8109012Z    Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
2020-04-12T20:14:37.6149988Z    Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
2020-04-12T20:14:46.0735170Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-04-12T20:14:48.0488904Z    Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
2020-04-12T20:14:52.1177339Z    Compiling rustc_attr v0.0.0 (/checkout/src/librustc_attr)
2020-04-12T20:14:55.9369771Z    Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2020-04-12T20:15:05.1491992Z    Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
2020-04-12T20:31:55.0576431Z    Compiling autocfg v0.1.7
2020-04-12T20:31:55.6806675Z error[E0631]: type mismatch in closure arguments
2020-04-12T20:31:55.6808601Z    --> src/libcore/iter/adapters/mod.rs:166:65
2020-04-12T20:31:55.6809661Z     |
2020-04-12T20:31:55.6811109Z 166 | fn copy_fold<T: Copy, Acc>(mut f: impl FnMut(Acc, T) -> Acc) -> impl FnMut(Acc, &T) -> Acc {
2020-04-12T20:31:55.6813226Z     |                                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected signature of `for<'r> fn(Acc, &'r T) -> _`
2020-04-12T20:31:55.6814884Z 167 |     move |acc, &elt| f(acc, elt)
2020-04-12T20:31:55.6817229Z     |     |
2020-04-12T20:31:55.6817229Z     |     |
2020-04-12T20:31:55.6818410Z     |     found signature of `fn(Acc, &T) -> _`
2020-04-12T20:31:55.6819994Z     |     this returned value is of type `[closure@src/libcore/iter/adapters/mod.rs:167:5: 167:33 f:_]`
2020-04-12T20:31:55.6822373Z     = note: the return type of a function must have a statically known size
2020-04-12T20:31:55.6823004Z 
2020-04-12T20:31:55.6823004Z 
2020-04-12T20:31:55.6825929Z error[E0271]: type mismatch resolving `for<'r> <[closure@src/libcore/iter/adapters/mod.rs:167:5: 167:33 f:_] as ops::function::FnOnce<(Acc, &'r T)>>::Output == Acc`
2020-04-12T20:31:55.6828443Z     |
2020-04-12T20:31:55.6828443Z     |
2020-04-12T20:31:55.6829827Z 166 | fn copy_fold<T: Copy, Acc>(mut f: impl FnMut(Acc, T) -> Acc) -> impl FnMut(Acc, &T) -> Acc {
2020-04-12T20:31:55.6831945Z     |                                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter, found concrete lifetime
2020-04-12T20:31:55.6834523Z     = note: the return type of a function must have a statically known size
2020-04-12T20:31:55.6835152Z 
2020-04-12T20:31:55.6866403Z error[E0631]: type mismatch in closure arguments
2020-04-12T20:31:55.6867411Z    --> src/libcore/iter/adapters/mod.rs:170:70
2020-04-12T20:31:55.6867411Z    --> src/libcore/iter/adapters/mod.rs:170:70
2020-04-12T20:31:55.6867935Z     |
2020-04-12T20:31:55.6868748Z 170 | fn copy_try_fold<T: Copy, Acc, R>(mut f: impl FnMut(Acc, T) -> R) -> impl FnMut(Acc, &T) -> R {
2020-04-12T20:31:55.6870055Z     |                                                                      ^^^^^^^^^^^^^^^^^^^^^^^^ expected signature of `for<'r> fn(Acc, &'r T) -> _`
2020-04-12T20:31:55.6871000Z 171 |     move |acc, &elt| f(acc, elt)
2020-04-12T20:31:55.6872286Z     |     |
2020-04-12T20:31:55.6872286Z     |     |
2020-04-12T20:31:55.6872967Z     |     found signature of `fn(Acc, &T) -> _`
2020-04-12T20:31:55.6873848Z     |     this returned value is of type `[closure@src/libcore/iter/adapters/mod.rs:171:5: 171:33 f:_]`
2020-04-12T20:31:55.6875180Z     = note: the return type of a function must have a statically known size
2020-04-12T20:31:55.6878307Z 
2020-04-12T20:31:55.6878307Z 
2020-04-12T20:31:55.6879640Z error[E0271]: type mismatch resolving `for<'r> <[closure@src/libcore/iter/adapters/mod.rs:171:5: 171:33 f:_] as ops::function::FnOnce<(Acc, &'r T)>>::Output == R`
2020-04-12T20:31:55.6882979Z     |
2020-04-12T20:31:55.6882979Z     |
2020-04-12T20:31:55.6884443Z 170 | fn copy_try_fold<T: Copy, Acc, R>(mut f: impl FnMut(Acc, T) -> R) -> impl FnMut(Acc, &T) -> R {
2020-04-12T20:31:55.6886633Z     |                                                                      ^^^^^^^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter, found concrete lifetime
2020-04-12T20:31:55.6889231Z     = note: the return type of a function must have a statically known size
2020-04-12T20:31:55.6889839Z 
2020-04-12T20:31:55.6919719Z error[E0282]: type annotations needed
2020-04-12T20:31:55.6920384Z    --> src/libcore/iter/adapters/mod.rs:313:16
2020-04-12T20:31:55.6920384Z    --> src/libcore/iter/adapters/mod.rs:313:16
2020-04-12T20:31:55.6920889Z     |
2020-04-12T20:31:55.6921507Z 313 |     move |acc, elt| f(acc, elt.clone())
2020-04-12T20:31:55.6922979Z     |
2020-04-12T20:31:55.6924116Z     = note: type must be known at this point
2020-04-12T20:31:55.6924404Z 
2020-04-12T20:31:55.7345825Z error[E0631]: type mismatch in closure arguments
2020-04-12T20:31:55.7345825Z error[E0631]: type mismatch in closure arguments
2020-04-12T20:31:55.7346582Z     --> src/libcore/iter/adapters/mod.rs:1620:14
2020-04-12T20:31:55.7347130Z      |
2020-04-12T20:31:55.7347773Z 1620 |           ) -> impl FnMut(&T) -> bool + 'a {
2020-04-12T20:31:55.7348711Z      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected signature of `for<'r> fn(&'r T) -> _`
2020-04-12T20:31:55.7349789Z 1621 |               move |x| {
2020-04-12T20:31:55.7350995Z      |               |
2020-04-12T20:31:55.7350995Z      |               |
2020-04-12T20:31:55.7351760Z      |  _____________found signature of `fn(&T) -> _`
2020-04-12T20:31:55.7352391Z      | |
2020-04-12T20:31:55.7353060Z 1622 | |                 if *flag || !pred(x) {
2020-04-12T20:31:55.7353833Z 1623 | |                     *flag = true;
2020-04-12T20:31:55.7355177Z ...    |
2020-04-12T20:31:55.7355791Z 1627 | |                 }
2020-04-12T20:31:55.7356504Z 1628 | |             }
2020-04-12T20:31:55.7356504Z 1628 | |             }
2020-04-12T20:31:55.7357455Z      | |_____________- this returned value is of type `[closure@src/libcore/iter/adapters/mod.rs:1621:13: 1628:14 flag:_, pred:_]`
2020-04-12T20:31:55.7358778Z      = note: the return type of a function must have a statically known size
2020-04-12T20:31:55.7359101Z 
2020-04-12T20:31:55.7359101Z 
2020-04-12T20:31:55.7359965Z error[E0271]: type mismatch resolving `for<'r> <[closure@src/libcore/iter/adapters/mod.rs:1621:13: 1628:14 flag:_, pred:_] as ops::function::FnOnce<(&'r T,)>>::Output == bool`
2020-04-12T20:31:55.7361291Z      |
2020-04-12T20:31:55.7361291Z      |
2020-04-12T20:31:55.7361855Z 1620 |         ) -> impl FnMut(&T) -> bool + 'a {
2020-04-12T20:31:55.7362724Z      |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter, found concrete lifetime
2020-04-12T20:31:55.7363991Z      = note: the return type of a function must have a statically known size
2020-04-12T20:31:55.7364307Z 
2020-04-12T20:31:55.7633933Z error[E0282]: type annotations needed
2020-04-12T20:31:55.7634690Z    --> src/libcore/iter/adapters/flatten.rs:302:24
2020-04-12T20:31:55.7634690Z    --> src/libcore/iter/adapters/flatten.rs:302:24
2020-04-12T20:31:55.7635223Z     |
2020-04-12T20:31:55.7635811Z 302 |             move |acc, x| {
2020-04-12T20:31:55.7636681Z     |                        ^ consider giving this closure parameter a type
2020-04-12T20:31:55.7642189Z     = note: type must be known at this point
2020-04-12T20:31:55.7642493Z 
2020-04-12T20:31:55.7643022Z error[E0282]: type annotations needed
2020-04-12T20:31:55.7643695Z    --> src/libcore/iter/adapters/flatten.rs:335:24
2020-04-12T20:31:55.7643695Z    --> src/libcore/iter/adapters/flatten.rs:335:24
2020-04-12T20:31:55.7644367Z     |
2020-04-12T20:31:55.7645004Z 335 |             move |acc, iter| iter.fold(acc, &mut *fold)
2020-04-12T20:31:55.7646622Z     |
2020-04-12T20:31:55.7647224Z     = note: type must be known at this point
2020-04-12T20:31:55.7647529Z 
2020-04-12T20:31:55.7658140Z error[E0282]: type annotations needed
2020-04-12T20:31:55.7658140Z error[E0282]: type annotations needed
2020-04-12T20:31:55.7658823Z    --> src/libcore/iter/adapters/flatten.rs:382:24
2020-04-12T20:31:55.7659370Z     |
2020-04-12T20:31:55.7659938Z 382 |             move |acc, x| {
2020-04-12T20:31:55.7660795Z     |                        ^ consider giving this closure parameter a type
2020-04-12T20:31:55.7662037Z     = note: type must be known at this point
2020-04-12T20:31:55.7662327Z 
2020-04-12T20:31:55.7669730Z error[E0282]: type annotations needed
2020-04-12T20:31:55.7670399Z    --> src/libcore/iter/adapters/flatten.rs:415:24
2020-04-12T20:31:55.7670399Z    --> src/libcore/iter/adapters/flatten.rs:415:24
2020-04-12T20:31:55.7670916Z     |
2020-04-12T20:31:55.7671579Z 415 |             move |acc, iter| iter.rfold(acc, &mut *fold)
2020-04-12T20:31:55.7673140Z     |
2020-04-12T20:31:55.7673734Z     = note: type must be known at this point
2020-04-12T20:31:55.7674020Z 
2020-04-12T20:31:55.7877613Z error[E0282]: type annotations needed
---
2020-04-12T20:31:55.7881852Z 
2020-04-12T20:31:55.7890426Z error[E0282]: type annotations needed
2020-04-12T20:31:55.7891108Z     --> src/libcore/iter/traits/iterator.rs:1768:19
2020-04-12T20:31:55.7891662Z      |
2020-04-12T20:31:55.7892272Z 1768 |             move |x| predicate(&**x)
2020-04-12T20:31:55.7893145Z      |                   ^ consider giving this closure parameter a type
2020-04-12T20:31:55.7894367Z      = note: type must be known at this point
2020-04-12T20:31:55.7894658Z 
2020-04-12T20:31:56.2224655Z    Compiling std v0.0.0 (/checkout/src/libstd)
2020-04-12T20:31:56.4992287Z error[E0631]: type mismatch in closure arguments
2020-04-12T20:31:56.4992287Z error[E0631]: type mismatch in closure arguments
2020-04-12T20:31:56.4992958Z    --> src/libcore/num/bignum.rs:173:49
2020-04-12T20:31:56.4994033Z 100 | / macro_rules! define_bignum {
2020-04-12T20:31:56.4994033Z 100 | / macro_rules! define_bignum {
2020-04-12T20:31:56.4995079Z 101 | |     ($name:ident: type=$ty:ty, n=$n:expr) => {
2020-04-12T20:31:56.4996040Z 102 | |         /// Stack-allocated arbitrary-precision (up to certain limit) integer.
2020-04-12T20:31:56.4997392Z ...   |
2020-04-12T20:31:56.4997392Z ...   |
2020-04-12T20:31:56.4998182Z 173 | |                 let zeros = digits.iter().rev().take_while(|&&x| x == 0).count();
2020-04-12T20:31:56.4999306Z     | |                                                 ^^^^^^^^^^ ------------ found signature of `fn(&&_) -> _`
2020-04-12T20:31:56.5000284Z     | |                                                 |
2020-04-12T20:31:56.5001181Z     | |                                                 expected signature of `for<'r> fn(&'r &u32) -> _`
2020-04-12T20:31:56.5002456Z 477 | |     };
2020-04-12T20:31:56.5003103Z 478 | | }
2020-04-12T20:31:56.5003826Z     | |_- in this expansion of `define_bignum!`
2020-04-12T20:31:56.5004327Z ...
2020-04-12T20:31:56.5004327Z ...
2020-04-12T20:31:56.5005205Z 483 |   define_bignum!(Big32x40: type=Digit32, n=40);
2020-04-12T20:31:56.5010499Z 
2020-04-12T20:31:56.5010499Z 
2020-04-12T20:31:56.5016041Z error[E0271]: type mismatch resolving `for<'r> <[closure@src/libcore/num/bignum.rs:173:60: 173:72] as ops::function::FnOnce<(&'r &u32,)>>::Output == bool`
2020-04-12T20:31:56.5016933Z    --> src/libcore/num/bignum.rs:173:49
2020-04-12T20:31:56.5018103Z 100 | / macro_rules! define_bignum {
2020-04-12T20:31:56.5018103Z 100 | / macro_rules! define_bignum {
2020-04-12T20:31:56.5019021Z 101 | |     ($name:ident: type=$ty:ty, n=$n:expr) => {
2020-04-12T20:31:56.5020113Z 102 | |         /// Stack-allocated arbitrary-precision (up to certain limit) integer.
2020-04-12T20:31:56.5021443Z ...   |
2020-04-12T20:31:56.5021443Z ...   |
2020-04-12T20:31:56.5022220Z 173 | |                 let zeros = digits.iter().rev().take_while(|&&x| x == 0).count();
2020-04-12T20:31:56.5023433Z     | |                                                 ^^^^^^^^^^ expected bound lifetime parameter, found concrete lifetime
2020-04-12T20:31:56.5024850Z 477 | |     };
2020-04-12T20:31:56.5025750Z 478 | | }
2020-04-12T20:31:56.5026716Z     | |_- in this expansion of `define_bignum!`
2020-04-12T20:31:56.5027256Z ...
2020-04-12T20:31:56.5027256Z ...
2020-04-12T20:31:56.5027926Z 483 |   define_bignum!(Big32x40: type=Digit32, n=40);
2020-04-12T20:31:56.5066360Z 
2020-04-12T20:31:56.5066360Z 
2020-04-12T20:31:56.5081397Z error[E0599]: no method named `count` found for struct `iter::adapters::TakeWhile<iter::adapters::Rev<slice::Iter<'_, u32>>, [closure@src/libcore/num/bignum.rs:173:60: 173:72]>` in the current scope
2020-04-12T20:31:56.5082309Z     --> src/libcore/num/bignum.rs:173:74
2020-04-12T20:31:56.5083647Z 100  | / macro_rules! define_bignum {
2020-04-12T20:31:56.5083647Z 100  | / macro_rules! define_bignum {
2020-04-12T20:31:56.5084567Z 101  | |     ($name:ident: type=$ty:ty, n=$n:expr) => {
2020-04-12T20:31:56.5085615Z 102  | |         /// Stack-allocated arbitrary-precision (up to certain limit) integer.
2020-04-12T20:31:56.5087085Z ...    |
2020-04-12T20:31:56.5087085Z ...    |
2020-04-12T20:31:56.5087918Z 173  | |                 let zeros = digits.iter().rev().take_while(|&&x| x == 0).count();
2020-04-12T20:31:56.5089593Z      | |                                                            ------------  ^^^^^ method not found in `iter::adapters::TakeWhile<iter::adapters::Rev<slice::Iter<'_, u32>>, [closure@src/libcore/num/bignum.rs:173:60: 173:72]>`
2020-04-12T20:31:56.5091076Z      | |                                                            |
2020-04-12T20:31:56.5092273Z      | |                                                            doesn't satisfy `<_ as ops::function::FnOnce<(&&u32,)>>::Output = bool`
2020-04-12T20:31:56.5093601Z      | |                                                            doesn't satisfy `_: ops::function::FnMut<(&&u32,)>`
2020-04-12T20:31:56.5095092Z 477  | |     };
2020-04-12T20:31:56.5095808Z 478  | | }
2020-04-12T20:31:56.5096714Z      | |_- in this expansion of `define_bignum!`
2020-04-12T20:31:56.5097258Z ...
2020-04-12T20:31:56.5097258Z ...
2020-04-12T20:31:56.5097949Z 483  |   define_bignum!(Big32x40: type=Digit32, n=40);
2020-04-12T20:31:56.5099616Z      | 
2020-04-12T20:31:56.5100190Z     ::: src/libcore/iter/adapters/mod.rs:1691:1
2020-04-12T20:31:56.5100712Z      |
2020-04-12T20:31:56.5100712Z      |
2020-04-12T20:31:56.5101322Z 1691 |   pub struct TakeWhile<I, P> {
2020-04-12T20:31:56.5102615Z      |   |
2020-04-12T20:31:56.5103274Z      |   method `count` not found for this
2020-04-12T20:31:56.5103274Z      |   method `count` not found for this
2020-04-12T20:31:56.5104075Z      |   doesn't satisfy `_: iter::traits::iterator::Iterator`
2020-04-12T20:31:56.5105646Z      = note: the method `count` exists but the following trait bounds were not satisfied:
2020-04-12T20:31:56.5105646Z      = note: the method `count` exists but the following trait bounds were not satisfied:
2020-04-12T20:31:56.5106576Z              `<[closure@src/libcore/num/bignum.rs:173:60: 173:72] as ops::function::FnOnce<(&&u32,)>>::Output = bool`
2020-04-12T20:31:56.5107669Z              which is required by `iter::adapters::TakeWhile<iter::adapters::Rev<slice::Iter<'_, u32>>, [closure@src/libcore/num/bignum.rs:173:60: 173:72]>: iter::traits::iterator::Iterator`
2020-04-12T20:31:56.5108654Z              `[closure@src/libcore/num/bignum.rs:173:60: 173:72]: ops::function::FnMut<(&&u32,)>`
2020-04-12T20:31:56.5109694Z              which is required by `iter::adapters::TakeWhile<iter::adapters::Rev<slice::Iter<'_, u32>>, [closure@src/libcore/num/bignum.rs:173:60: 173:72]>: iter::traits::iterator::Iterator`
2020-04-12T20:31:56.5110898Z              `iter::adapters::TakeWhile<iter::adapters::Rev<slice::Iter<'_, u32>>, [closure@src/libcore/num/bignum.rs:173:60: 173:72]>: iter::traits::iterator::Iterator`
2020-04-12T20:31:56.5112159Z              which is required by `&mut iter::adapters::TakeWhile<iter::adapters::Rev<slice::Iter<'_, u32>>, [closure@src/libcore/num/bignum.rs:173:60: 173:72]>: iter::traits::iterator::Iterator`
2020-04-12T20:31:56.5130666Z error[E0631]: type mismatch in closure arguments
2020-04-12T20:31:56.5130666Z error[E0631]: type mismatch in closure arguments
2020-04-12T20:31:56.5131331Z    --> src/libcore/num/bignum.rs:173:49
2020-04-12T20:31:56.5132697Z 100 | / macro_rules! define_bignum {
2020-04-12T20:31:56.5132697Z 100 | / macro_rules! define_bignum {
2020-04-12T20:31:56.5133617Z 101 | |     ($name:ident: type=$ty:ty, n=$n:expr) => {
2020-04-12T20:31:56.5134724Z 102 | |         /// Stack-allocated arbitrary-precision (up to certain limit) integer.
2020-04-12T20:31:56.5136074Z ...   |
2020-04-12T20:31:56.5136074Z ...   |
2020-04-12T20:31:56.5136834Z 173 | |                 let zeros = digits.iter().rev().take_while(|&&x| x == 0).count();
2020-04-12T20:31:56.5138113Z     | |                                                 ^^^^^^^^^^ ------------ found signature of `fn(&&_) -> _`
2020-04-12T20:31:56.5139128Z     | |                                                 |
2020-04-12T20:31:56.5140052Z     | |                                                 expected signature of `for<'r> fn(&'r &u8) -> _`
2020-04-12T20:31:56.5141323Z 477 | |     };
2020-04-12T20:31:56.5141970Z 478 | | }
2020-04-12T20:31:56.5142676Z     | |_- in this expansion of `define_bignum!`
2020-04-12T20:31:56.5143193Z ...
2020-04-12T20:31:56.5143193Z ...
2020-04-12T20:31:56.5143804Z 488 |       define_bignum!(Big8x3: type=u8, n=3);
2020-04-12T20:31:56.5145022Z 
2020-04-12T20:31:56.5145022Z 
2020-04-12T20:31:56.5146049Z error[E0271]: type mismatch resolving `for<'r> <[closure@src/libcore/num/bignum.rs:173:60: 173:72] as ops::function::FnOnce<(&'r &u8,)>>::Output == bool`
2020-04-12T20:31:56.5146848Z    --> src/libcore/num/bignum.rs:173:49
2020-04-12T20:31:56.5147926Z 100 | / macro_rules! define_bignum {
2020-04-12T20:31:56.5147926Z 100 | / macro_rules! define_bignum {
2020-04-12T20:31:56.5148785Z 101 | |     ($name:ident: type=$ty:ty, n=$n:expr) => {
2020-04-12T20:31:56.5149734Z 102 | |         /// Stack-allocated arbitrary-precision (up to certain limit) integer.
2020-04-12T20:31:56.5151073Z ...   |
2020-04-12T20:31:56.5151073Z ...   |
2020-04-12T20:31:56.5151829Z 173 | |                 let zeros = digits.iter().rev().take_while(|&&x| x == 0).count();
2020-04-12T20:31:56.5192094Z     | |                                                 ^^^^^^^^^^ expected bound lifetime parameter, found concrete lifetime
2020-04-12T20:31:56.5193710Z 477 | |     };
2020-04-12T20:31:56.5194383Z 478 | | }
2020-04-12T20:31:56.5195093Z     | |_- in this expansion of `define_bignum!`
2020-04-12T20:31:56.5195611Z ...
2020-04-12T20:31:56.5195611Z ...
2020-04-12T20:31:56.5196227Z 488 |       define_bignum!(Big8x3: type=u8, n=3);
2020-04-12T20:31:56.5197586Z 
2020-04-12T20:31:56.5197586Z 
2020-04-12T20:31:56.5198583Z error[E0599]: no method named `count` found for struct `iter::adapters::TakeWhile<iter::adapters::Rev<slice::Iter<'_, u8>>, [closure@src/libcore/num/bignum.rs:173:60: 173:72]>` in the current scope
2020-04-12T20:31:56.5199485Z     --> src/libcore/num/bignum.rs:173:74
2020-04-12T20:31:56.5200561Z 100  | / macro_rules! define_bignum {
2020-04-12T20:31:56.5200561Z 100  | / macro_rules! define_bignum {
2020-04-12T20:31:56.5201425Z 101  | |     ($name:ident: type=$ty:ty, n=$n:expr) => {
2020-04-12T20:31:56.5202364Z 102  | |         /// Stack-allocated arbitrary-precision (up to certain limit) integer.
2020-04-12T20:31:56.5203733Z ...    |
2020-04-12T20:31:56.5203733Z ...    |
2020-04-12T20:31:56.5204978Z 173  | |                 let zeros = digits.iter().rev().take_while(|&&x| x == 0).count();
2020-04-12T20:31:56.5207681Z      | |                                                            ------------  ^^^^^ method not found in `iter::adapters::TakeWhile<iter::adapters::Rev<slice::Iter<'_, u8>>, [closure@src/libcore/num/bignum.rs:173:60: 173:72]>`
2020-04-12T20:31:56.5209117Z      | |                                                            |
2020-04-12T20:31:56.5210295Z      | |                                                            doesn't satisfy `<_ as ops::function::FnOnce<(&&u8,)>>::Output = bool`
2020-04-12T20:31:56.5211632Z      | |                                                            doesn't satisfy `_: ops::function::FnMut<(&&u8,)>`
2020-04-12T20:31:56.5213160Z 477  | |     };
2020-04-12T20:31:56.5213859Z 478  | | }
2020-04-12T20:31:56.5214634Z      | |_- in this expansion of `define_bignum!`
2020-04-12T20:31:56.5215194Z ...
2020-04-12T20:31:56.5215194Z ...
2020-04-12T20:31:56.5215851Z 488  |       define_bignum!(Big8x3: type=u8, n=3);
2020-04-12T20:31:56.5217439Z      | 
2020-04-12T20:31:56.5218011Z     ::: src/libcore/iter/adapters/mod.rs:1691:1
2020-04-12T20:31:56.5218544Z      |
2020-04-12T20:31:56.5218544Z      |
2020-04-12T20:31:56.5219143Z 1691 |   pub struct TakeWhile<I, P> {
2020-04-12T20:31:56.5220542Z      |   |
2020-04-12T20:31:56.5221186Z      |   method `count` not found for this
2020-04-12T20:31:56.5221186Z      |   method `count` not found for this
2020-04-12T20:31:56.5221985Z      |   doesn't satisfy `_: iter::traits::iterator::Iterator`
2020-04-12T20:31:56.5223457Z      = note: the method `count` exists but the following trait bounds were not satisfied:
2020-04-12T20:31:56.5223457Z      = note: the method `count` exists but the following trait bounds were not satisfied:
2020-04-12T20:31:56.5224321Z              `<[closure@src/libcore/num/bignum.rs:173:60: 173:72] as ops::function::FnOnce<(&&u8,)>>::Output = bool`
2020-04-12T20:31:56.5225348Z              which is required by `iter::adapters::TakeWhile<iter::adapters::Rev<slice::Iter<'_, u8>>, [closure@src/libcore/num/bignum.rs:173:60: 173:72]>: iter::traits::iterator::Iterator`
2020-04-12T20:31:56.5226475Z              `[closure@src/libcore/num/bignum.rs:173:60: 173:72]: ops::function::FnMut<(&&u8,)>`
2020-04-12T20:31:56.5227449Z              which is required by `iter::adapters::TakeWhile<iter::adapters::Rev<slice::Iter<'_, u8>>, [closure@src/libcore/num/bignum.rs:173:60: 173:72]>: iter::traits::iterator::Iterator`
2020-04-12T20:31:56.5228544Z              `iter::adapters::TakeWhile<iter::adapters::Rev<slice::Iter<'_, u8>>, [closure@src/libcore/num/bignum.rs:173:60: 173:72]>: iter::traits::iterator::Iterator`
2020-04-12T20:31:56.5229664Z              which is required by `&mut iter::adapters::TakeWhile<iter::adapters::Rev<slice::Iter<'_, u8>>, [closure@src/libcore/num/bignum.rs:173:60: 173:72]>: iter::traits::iterator::Iterator`
2020-04-12T20:31:56.5947413Z    Compiling compiler_builtins v0.1.25
2020-04-12T20:31:56.9229695Z error[E0631]: type mismatch in closure arguments
2020-04-12T20:31:56.9230802Z    --> src/libcore/cmp.rs:973:5
2020-04-12T20:31:56.9231331Z     |
2020-04-12T20:31:56.9231331Z     |
2020-04-12T20:31:56.9232118Z 948 | pub fn min_by<T, F: FnOnce(&T, &T) -> Ordering>(v1: T, v2: T, compare: F) -> T {
2020-04-12T20:31:56.9233290Z     |                     -------------------------- required by this bound in `cmp::min_by`
2020-04-12T20:31:56.9234002Z ...
2020-04-12T20:31:56.9234621Z 973 |     min_by(v1, v2, |v1, v2| f(v1).cmp(&f(v2)))
2020-04-12T20:31:56.9235678Z     |     ^^^^^^         -------------------------- found signature of `fn(&T, &T) -> _`
2020-04-12T20:31:56.9236408Z     |     |
2020-04-12T20:31:56.9237083Z     |     expected signature of `for<'r, 's> fn(&'r T, &'s T) -> _`
2020-04-12T20:31:56.9237374Z 
2020-04-12T20:31:56.9238227Z error[E0271]: type mismatch resolving `for<'r, 's> <[closure@src/libcore/cmp.rs:973:20: 973:46 f:_] as ops::function::FnOnce<(&'r T, &'s T)>>::Output == cmp::Ordering`
2020-04-12T20:31:56.9257159Z    --> src/libcore/cmp.rs:973:5
2020-04-12T20:31:56.9257683Z     |
2020-04-12T20:31:56.9258412Z 948 | pub fn min_by<T, F: FnOnce(&T, &T) -> Ordering>(v1: T, v2: T, compare: F) -> T {
2020-04-12T20:31:56.9259677Z     |                                       -------- required by this bound in `cmp::min_by`
2020-04-12T20:31:56.9260585Z ...
2020-04-12T20:31:56.9261188Z 973 |     min_by(v1, v2, |v1, v2| f(v1).cmp(&f(v2)))
2020-04-12T20:31:56.9262068Z     |     ^^^^^^ expected bound lifetime parameter, found concrete lifetime
2020-04-12T20:31:56.9263020Z error[E0631]: type mismatch in closure arguments
2020-04-12T20:31:56.9263665Z     --> src/libcore/cmp.rs:1039:5
2020-04-12T20:31:56.9264144Z      |
2020-04-12T20:31:56.9264144Z      |
2020-04-12T20:31:56.9264930Z 1014 | pub fn max_by<T, F: FnOnce(&T, &T) -> Ordering>(v1: T, v2: T, compare: F) -> T {
2020-04-12T20:31:56.9266176Z      |                     -------------------------- required by this bound in `cmp::max_by`
2020-04-12T20:31:56.9267873Z ...
2020-04-12T20:31:56.9268514Z 1039 |     max_by(v1, v2, |v1, v2| f(v1).cmp(&f(v2)))
2020-04-12T20:31:56.9269505Z      |     ^^^^^^         -------------------------- found signature of `fn(&T, &T) -> _`
2020-04-12T20:31:56.9270312Z      |     |
2020-04-12T20:31:56.9271025Z      |     expected signature of `for<'r, 's> fn(&'r T, &'s T) -> _`
2020-04-12T20:31:56.9271340Z 
2020-04-12T20:31:56.9272215Z error[E0271]: type mismatch resolving `for<'r, 's> <[closure@src/libcore/cmp.rs:1039:20: 1039:46 f:_] as ops::function::FnOnce<(&'r T, &'s T)>>::Output == cmp::Ordering`
2020-04-12T20:31:56.9273089Z     --> src/libcore/cmp.rs:1039:5
2020-04-12T20:31:56.9273568Z      |
2020-04-12T20:31:56.9274361Z 1014 | pub fn max_by<T, F: FnOnce(&T, &T) -> Ordering>(v1: T, v2: T, compare: F) -> T {
2020-04-12T20:31:56.9275480Z      |                                       -------- required by this bound in `cmp::max_by`
2020-04-12T20:31:56.9276202Z ...
2020-04-12T20:31:56.9276803Z 1039 |     max_by(v1, v2, |v1, v2| f(v1).cmp(&f(v2)))
2020-04-12T20:31:56.9277689Z      |     ^^^^^^ expected bound lifetime parameter, found concrete lifetime
2020-04-12T20:31:57.0935689Z error[E0282]: type annotations needed
2020-04-12T20:31:57.0936405Z    --> src/libcore/array/mod.rs:145:39
2020-04-12T20:31:57.0936929Z     |
2020-04-12T20:31:57.0936929Z     |
2020-04-12T20:31:57.0937585Z 145 |         <&Self>::try_from(slice).map(|r| *r)
2020-04-12T20:31:57.0938553Z     |                                       ^ consider giving this closure parameter a type
2020-04-12T20:31:57.0939795Z     = note: type must be known at this point
2020-04-12T20:31:57.0940101Z 
2020-04-12T20:31:57.3067875Z error[E0631]: type mismatch in closure arguments
2020-04-12T20:31:57.3068598Z     --> src/libcore/iter/adapters/mod.rs:2420:14
2020-04-12T20:31:57.3068598Z     --> src/libcore/iter/adapters/mod.rs:2420:14
2020-04-12T20:31:57.3069303Z      |
2020-04-12T20:31:57.3070032Z 2420 |         self.find(|_| true)
2020-04-12T20:31:57.3070947Z      |              ^^^^ -------- found signature of `fn(_) -> _`
2020-04-12T20:31:57.3071806Z      |              |
2020-04-12T20:31:57.3072540Z      |              expected signature of `for<'r> fn(&'r T) -> _`
2020-04-12T20:31:57.3072866Z 
2020-04-12T20:31:57.3073693Z error[E0271]: type mismatch resolving `for<'r> <[closure@src/libcore/iter/adapters/mod.rs:2420:19: 2420:27] as ops::function::FnOnce<(&'r T,)>>::Output == bool`
2020-04-12T20:31:57.3075094Z      |
2020-04-12T20:31:57.3075094Z      |
2020-04-12T20:31:57.3075657Z 2420 |         self.find(|_| true)
2020-04-12T20:31:57.3076512Z      |              ^^^^ expected bound lifetime parameter, found concrete lifetime
2020-04-12T20:31:57.4643131Z error[E0282]: type annotations needed
2020-04-12T20:31:57.4644244Z    --> src/libcore/iter/traits/accum.rs:144:38
2020-04-12T20:31:57.4644788Z     |
2020-04-12T20:31:57.4644788Z     |
2020-04-12T20:31:57.4645451Z 144 |         iter::process_results(iter, |i| i.sum())
2020-04-12T20:31:57.4646412Z     |                                      ^ consider giving this closure parameter a type
2020-04-12T20:31:57.4647657Z     = note: type must be known at this point
2020-04-12T20:31:57.4650640Z 
2020-04-12T20:31:57.4651318Z error[E0282]: type annotations needed
2020-04-12T20:31:57.4651905Z    --> src/libcore/iter/traits/accum.rs:160:38
2020-04-12T20:31:57.4651905Z    --> src/libcore/iter/traits/accum.rs:160:38
2020-04-12T20:31:57.4652400Z     |
2020-04-12T20:31:57.4653016Z 160 |         iter::process_results(iter, |i| i.product())
2020-04-12T20:31:57.4653892Z     |                                      ^ consider giving this closure parameter a type
2020-04-12T20:31:57.4655051Z     = note: type must be known at this point
2020-04-12T20:31:57.4655320Z 
2020-04-12T20:31:57.4655763Z error[E0282]: type annotations needed
2020-04-12T20:31:57.4656340Z    --> src/libcore/iter/traits/accum.rs:187:19
2020-04-12T20:31:57.4656340Z    --> src/libcore/iter/traits/accum.rs:187:19
2020-04-12T20:31:57.4656803Z     |
2020-04-12T20:31:57.4657466Z 187 |         iter.map(|x| x.ok_or(())).sum::<Result<_, _>>().ok()
2020-04-12T20:31:57.4658331Z     |                   ^ consider giving this closure parameter a type
2020-04-12T20:31:57.4661990Z     = note: type must be known at this point
2020-04-12T20:31:57.4662278Z 
2020-04-12T20:31:57.4662859Z error[E0282]: type annotations needed
2020-04-12T20:31:57.4663628Z    --> src/libcore/iter/traits/accum.rs:203:19
2020-04-12T20:31:57.4663628Z    --> src/libcore/iter/traits/accum.rs:203:19
2020-04-12T20:31:57.4664093Z     |
2020-04-12T20:31:57.4664748Z 203 |         iter.map(|x| x.ok_or(())).product::<Result<_, _>>().ok()
2020-04-12T20:31:57.4665808Z     |                   ^ consider giving this closure parameter a type
2020-04-12T20:31:57.4666942Z     = note: type must be known at this point
2020-04-12T20:31:57.4667221Z 
2020-04-12T20:31:57.5027262Z error[E0282]: type annotations needed
2020-04-12T20:31:57.5027930Z     --> src/libcore/iter/traits/iterator.rs:2856:29
2020-04-12T20:31:57.5027930Z     --> src/libcore/iter/traits/iterator.rs:2856:29
2020-04-12T20:31:57.5028641Z      |
2020-04-12T20:31:57.5029282Z 2856 |         self.cmp_by(other, |x, y| x.cmp(&y))
2020-04-12T20:31:57.5030164Z      |                             ^ consider giving this closure parameter a type
2020-04-12T20:31:57.5031423Z      = note: type must be known at this point
2020-04-12T20:31:57.5031713Z 
2020-04-12T20:31:57.5050975Z error[E0282]: type annotations needed
2020-04-12T20:31:57.5051665Z     --> src/libcore/iter/traits/iterator.rs:2932:37
2020-04-12T20:31:57.5051665Z     --> src/libcore/iter/traits/iterator.rs:2932:37
2020-04-12T20:31:57.5052188Z      |
2020-04-12T20:31:57.5052862Z 2932 |         self.partial_cmp_by(other, |x, y| x.partial_cmp(&y))
2020-04-12T20:31:57.5053805Z      |                                     ^ consider giving this closure parameter a type
2020-04-12T20:31:57.5055072Z      = note: type must be known at this point
2020-04-12T20:31:57.5055361Z 
2020-04-12T20:31:57.5304719Z error[E0282]: type annotations needed
2020-04-12T20:31:57.5305378Z     --> src/libcore/option.rs:1028:19
2020-04-12T20:31:57.5305378Z     --> src/libcore/option.rs:1028:19
2020-04-12T20:31:57.5308788Z      |
2020-04-12T20:31:57.5309662Z 1028 |         self.map(|t| t.clone())
2020-04-12T20:31:57.5310679Z      |                   ^ consider giving this closure parameter a type
2020-04-12T20:31:57.5311927Z      = note: type must be known at this point
2020-04-12T20:31:57.5312218Z 
2020-04-12T20:31:57.5312740Z error[E0282]: type annotations needed
2020-04-12T20:31:57.5313346Z     --> src/libcore/option.rs:1047:19
2020-04-12T20:31:57.5313346Z     --> src/libcore/option.rs:1047:19
2020-04-12T20:31:57.5313853Z      |
2020-04-12T20:31:57.5314427Z 1047 |         self.map(|t| t.clone())
2020-04-12T20:31:57.5315258Z      |                   ^ consider giving this closure parameter a type
2020-04-12T20:31:57.5316487Z      = note: type must be known at this point
2020-04-12T20:31:57.5316773Z 
2020-04-12T20:31:57.5323090Z error[E0282]: type annotations needed
2020-04-12T20:31:57.5323718Z     --> src/libcore/option.rs:1197:28
2020-04-12T20:31:57.5323718Z     --> src/libcore/option.rs:1197:28
2020-04-12T20:31:57.5324211Z      |
2020-04-12T20:31:57.5324838Z 1197 |         self.as_ref().map(|t| t.deref())
2020-04-12T20:31:57.5325844Z      |                            ^ consider giving this closure parameter a type
2020-04-12T20:31:57.5327109Z      = note: type must be known at this point
2020-04-12T20:31:57.5330027Z 
2020-04-12T20:31:57.5330685Z error[E0282]: type annotations needed
2020-04-12T20:31:57.5331313Z     --> src/libcore/option.rs:1218:28
2020-04-12T20:31:57.5331313Z     --> src/libcore/option.rs:1218:28
2020-04-12T20:31:57.5331814Z      |
2020-04-12T20:31:57.5332442Z 1218 |         self.as_mut().map(|t| t.deref_mut())
2020-04-12T20:31:57.5333388Z      |                            ^ consider giving this closure parameter a type
2020-04-12T20:31:57.5334546Z      = note: type must be known at this point
2020-04-12T20:31:57.5334810Z 
2020-04-12T20:31:57.5434009Z error[E0282]: type annotations needed
2020-04-12T20:31:57.5434636Z     --> src/libcore/option.rs:1630:31
2020-04-12T20:31:57.5434636Z     --> src/libcore/option.rs:1630:31
2020-04-12T20:31:57.5435097Z      |
2020-04-12T20:31:57.5435798Z 1630 |         iter.into_iter().map(|x| x.ok_or(())).collect::<Result<_, _>>().ok()
2020-04-12T20:31:57.5436750Z      |                               ^ consider giving this closure parameter a type
2020-04-12T20:31:57.5437894Z      = note: type must be known at this point
2020-04-12T20:31:57.5438180Z 
2020-04-12T20:31:57.5826586Z error[E0282]: type annotations needed
2020-04-12T20:31:57.5831024Z    --> src/libcore/result.rs:914:19
2020-04-12T20:31:57.5831024Z    --> src/libcore/result.rs:914:19
2020-04-12T20:31:57.5831582Z     |
2020-04-12T20:31:57.5832167Z 914 |         self.map(|t| t.clone())
2020-04-12T20:31:57.5833003Z     |                   ^ consider giving this closure parameter a type
2020-04-12T20:31:57.5834260Z     = note: type must be known at this point
2020-04-12T20:31:57.5834547Z 
2020-04-12T20:31:57.5835087Z error[E0282]: type annotations needed
2020-04-12T20:31:57.5835682Z    --> src/libcore/result.rs:934:19
2020-04-12T20:31:57.5835682Z    --> src/libcore/result.rs:934:19
2020-04-12T20:31:57.5836172Z     |
2020-04-12T20:31:57.5836758Z 934 |         self.map(|t| t.clone())
2020-04-12T20:31:57.5837589Z     |                   ^ consider giving this closure parameter a type
2020-04-12T20:31:57.5838803Z     = note: type must be known at this point
2020-04-12T20:31:57.5839235Z 
2020-04-12T20:31:57.5851975Z error[E0282]: type annotations needed
2020-04-12T20:31:57.5852597Z     --> src/libcore/result.rs:1155:28
2020-04-12T20:31:57.5852597Z     --> src/libcore/result.rs:1155:28
2020-04-12T20:31:57.5853056Z      |
2020-04-12T20:31:57.5853617Z 1155 |         self.as_ref().map(|t| t.deref())
2020-04-12T20:31:57.5854596Z      |                            ^ consider giving this closure parameter a type
2020-04-12T20:31:57.5855753Z      = note: type must be known at this point
2020-04-12T20:31:57.5858632Z 
2020-04-12T20:31:57.5859253Z error[E0282]: type annotations needed
2020-04-12T20:31:57.5859818Z     --> src/libcore/result.rs:1166:32
2020-04-12T20:31:57.5859818Z     --> src/libcore/result.rs:1166:32
2020-04-12T20:31:57.5860309Z      |
2020-04-12T20:31:57.5860876Z 1166 |         self.as_ref().map_err(|e| e.deref())
2020-04-12T20:31:57.5861697Z      |                                ^ consider giving this closure parameter a type
2020-04-12T20:31:57.5862859Z      = note: type must be known at this point
2020-04-12T20:31:57.5863126Z 
2020-04-12T20:31:57.5867091Z error[E0282]: type annotations needed
2020-04-12T20:31:57.5867665Z     --> src/libcore/result.rs:1177:28
2020-04-12T20:31:57.5867665Z     --> src/libcore/result.rs:1177:28
2020-04-12T20:31:57.5868123Z      |
2020-04-12T20:31:57.5868715Z 1177 |         self.as_mut().map(|t| t.deref_mut())
2020-04-12T20:31:57.5869541Z      |                            ^ consider giving this closure parameter a type
2020-04-12T20:31:57.5870693Z      = note: type must be known at this point
2020-04-12T20:31:57.5870963Z 
2020-04-12T20:31:57.5875300Z error[E0282]: type annotations needed
2020-04-12T20:31:57.5875943Z     --> src/libcore/result.rs:1188:32
2020-04-12T20:31:57.5875943Z     --> src/libcore/result.rs:1188:32
2020-04-12T20:31:57.5876437Z      |
2020-04-12T20:31:57.5877058Z 1188 |         self.as_mut().map_err(|e| e.deref_mut())
2020-04-12T20:31:57.5877974Z      |                                ^ consider giving this closure parameter a type
2020-04-12T20:31:57.5879231Z      = note: type must be known at this point
2020-04-12T20:31:57.5879520Z 
2020-04-12T20:31:57.5957972Z error[E0282]: type annotations needed
2020-04-12T20:31:57.5958586Z     --> src/libcore/result.rs:1537:50
2020-04-12T20:31:57.5958586Z     --> src/libcore/result.rs:1537:50
2020-04-12T20:31:57.5959071Z      |
2020-04-12T20:31:57.5959728Z 1537 |         iter::process_results(iter.into_iter(), |i| i.collect())
2020-04-12T20:31:57.5960678Z      |                                                  ^ consider giving this closure parameter a type
2020-04-12T20:31:57.5961992Z      = note: type must be known at this point
2020-04-12T20:31:57.5962271Z 
2020-04-12T20:31:57.6508556Z error[E0282]: type annotations needed
2020-04-12T20:31:57.6509177Z    --> src/libcore/fmt/mod.rs:356:60
2020-04-12T20:31:57.6509177Z    --> src/libcore/fmt/mod.rs:356:60
2020-04-12T20:31:57.6509669Z     |
2020-04-12T20:31:57.6510533Z 356 |         let pieces_length: usize = self.pieces.iter().map(|x| x.len()).sum();
2020-04-12T20:31:57.6511530Z     |                                                            ^ consider giving this closure parameter a type
2020-04-12T20:31:57.6512732Z     = note: type must be known at this point
2020-04-12T20:31:57.6513022Z 
2020-04-12T20:31:57.6513022Z 
2020-04-12T20:31:57.7173368Z error[E0271]: type mismatch resolving `<[closure@src/libcore/fmt/builders.rs:24:22: 27:10 state:_, slot:_] as ops::function::FnOnce<(&mut dyn fmt::Write,)>>::Output == &mut dyn fmt::Write`
2020-04-12T20:31:57.7174375Z   --> src/libcore/fmt/builders.rs:24:13
2020-04-12T20:31:57.7174914Z    |
2020-04-12T20:31:57.7175511Z 24 |         fmt.wrap_buf(move |buf| {
2020-04-12T20:31:57.7176545Z    |             ^^^^^^^^ expected struct `fmt::builders::PadAdapter`, found trait object `dyn fmt::Write`
2020-04-12T20:31:57.7177302Z    |
2020-04-12T20:31:57.7178071Z    = note: expected mutable reference `&mut fmt::builders::PadAdapter<'buf, 'state>`
2020-04-12T20:31:57.7178921Z               found mutable reference `&mut dyn fmt::Write`
2020-04-12T20:31:57.8840393Z error[E0282]: type annotations needed
2020-04-12T20:31:57.8841245Z     --> src/libcore/slice/mod.rs:1503:32
2020-04-12T20:31:57.8841750Z      |
2020-04-12T20:31:57.8841750Z      |
2020-04-12T20:31:57.8842426Z 1503 |         self.binary_search_by(|p| p.cmp(x))
2020-04-12T20:31:57.8843323Z      |                                ^ consider giving this closure parameter a type
2020-04-12T20:31:57.8844582Z      = note: type must be known at this point
2020-04-12T20:31:57.8844872Z 
2020-04-12T20:31:57.8887220Z error[E0282]: type annotations needed
2020-04-12T20:31:57.8887885Z     --> src/libcore/slice/mod.rs:1638:32
2020-04-12T20:31:57.8887885Z     --> src/libcore/slice/mod.rs:1638:32
2020-04-12T20:31:57.8888382Z      |
2020-04-12T20:31:57.8889066Z 1638 |         sort::quicksort(self, |a, b| a.lt(b));
2020-04-12T20:31:57.8890030Z      |                                ^ consider giving this closure parameter a type
2020-04-12T20:31:57.8891289Z      = note: type must be known at this point
2020-04-12T20:31:57.8891578Z 
2020-04-12T20:31:57.8908553Z error[E0631]: type mismatch in closure arguments
2020-04-12T20:31:57.8909245Z     --> src/libcore/slice/mod.rs:1693:9
2020-04-12T20:31:57.8909245Z     --> src/libcore/slice/mod.rs:1693:9
2020-04-12T20:31:57.8909950Z      |
2020-04-12T20:31:57.8910720Z 1693 |         sort::quicksort(self, |a, b| compare(a, b) == Ordering::Less);
2020-04-12T20:31:57.8911959Z      |         ^^^^^^^^^^^^^^^       -------------------------------------- found signature of `fn(&T, &T) -> _`
2020-04-12T20:31:57.8912816Z      |         |
2020-04-12T20:31:57.8913559Z      |         expected signature of `for<'r, 's> fn(&'r T, &'s T) -> _`
2020-04-12T20:31:57.8914704Z     ::: src/libcore/slice/sort.rs:688:8
2020-04-12T20:31:57.8915209Z      |
2020-04-12T20:31:57.8915209Z      |
2020-04-12T20:31:57.8915890Z 688  | pub fn quicksort<T, F>(v: &mut [T], mut is_less: F)
2020-04-12T20:31:57.8917218Z 689  | where
2020-04-12T20:31:57.8917218Z 689  | where
2020-04-12T20:31:57.8917873Z 690  |     F: FnMut(&T, &T) -> bool,
2020-04-12T20:31:57.8918887Z      |        --------------------- required by this bound in `slice::sort::quicksort`
2020-04-12T20:31:57.8919359Z 
2020-04-12T20:31:57.8933421Z error[E0271]: type mismatch resolving `for<'r, 's> <[closure@src/libcore/slice/mod.rs:1693:31: 1693:69 compare:_] as ops::function::FnOnce<(&'r T, &'s T)>>::Output == bool`
2020-04-12T20:31:57.8934922Z      |
2020-04-12T20:31:57.8934922Z      |
2020-04-12T20:31:57.8935629Z 1693 |         sort::quicksort(self, |a, b| compare(a, b) == Ordering::Less);
2020-04-12T20:31:57.8936562Z      |         ^^^^^^^^^^^^^^^ expected bound lifetime parameter, found concrete lifetime
2020-04-12T20:31:57.8937938Z     ::: src/libcore/slice/sort.rs:688:8
2020-04-12T20:31:57.8938526Z      |
2020-04-12T20:31:57.8938526Z      |
2020-04-12T20:31:57.8939383Z 688  | pub fn quicksort<T, F>(v: &mut [T], mut is_less: F)
2020-04-12T20:31:57.8940962Z 689  | where
2020-04-12T20:31:57.8940962Z 689  | where
2020-04-12T20:31:57.8941645Z 690  |     F: FnMut(&T, &T) -> bool,
2020-04-12T20:31:57.8942627Z      |                         ---- required by this bound in `slice::sort::quicksort`
2020-04-12T20:31:57.8962208Z error[E0631]: type mismatch in closure arguments
2020-04-12T20:31:57.8962874Z     --> src/libcore/slice/mod.rs:1732:9
2020-04-12T20:31:57.8963372Z      |
2020-04-12T20:31:57.8963372Z      |
2020-04-12T20:31:57.8964061Z 1732 |         sort::quicksort(self, |a, b| f(a).lt(&f(b)));
2020-04-12T20:31:57.8965112Z      |         ^^^^^^^^^^^^^^^       --------------------- found signature of `fn(&T, &T) -> _`
2020-04-12T20:31:57.8966116Z      |         |
2020-04-12T20:31:57.8966843Z      |         expected signature of `for<'r, 's> fn(&'r T, &'s T) -> _`
2020-04-12T20:31:57.8968064Z     ::: src/libcore/slice/sort.rs:688:8
2020-04-12T20:31:57.8968583Z      |
2020-04-12T20:31:57.8968583Z      |
2020-04-12T20:31:57.8969262Z 688  | pub fn quicksort<T, F>(v: &mut [T], mut is_less: F)
2020-04-12T20:31:57.8970588Z 689  | where
2020-04-12T20:31:57.8970588Z 689  | where
2020-04-12T20:31:57.8971267Z 690  |     F: FnMut(&T, &T) -> bool,
2020-04-12T20:31:57.8972261Z      |        --------------------- required by this bound in `slice::sort::quicksort`
2020-04-12T20:31:57.8972727Z 
2020-04-12T20:31:57.8973591Z error[E0271]: type mismatch resolving `for<'r, 's> <[closure@src/libcore/slice/mod.rs:1732:31: 1732:52 f:_] as ops::function::FnOnce<(&'r T, &'s T)>>::Output == bool`
2020-04-12T20:31:57.8974948Z      |
2020-04-12T20:31:57.8974948Z      |
2020-04-12T20:31:57.8975633Z 1732 |         sort::quicksort(self, |a, b| f(a).lt(&f(b)));
2020-04-12T20:31:57.8976581Z      |         ^^^^^^^^^^^^^^^ expected bound lifetime parameter, found concrete lifetime
2020-04-12T20:31:57.8977794Z     ::: src/libcore/slice/sort.rs:688:8
2020-04-12T20:31:57.8978296Z      |
2020-04-12T20:31:57.8978296Z      |
2020-04-12T20:31:57.8978988Z 688  | pub fn quicksort<T, F>(v: &mut [T], mut is_less: F)
2020-04-12T20:31:57.8980298Z 689  | where
2020-04-12T20:31:57.8980298Z 689  | where
2020-04-12T20:31:57.8980976Z 690  |     F: FnMut(&T, &T) -> bool,
2020-04-12T20:31:57.8981952Z      |                         ---- required by this bound in `slice::sort::quicksort`
2020-04-12T20:31:57.9028933Z error[E0631]: type mismatch in closure arguments
2020-04-12T20:31:57.9029622Z     --> src/libcore/slice/mod.rs:1918:14
2020-04-12T20:31:57.9030120Z      |
2020-04-12T20:31:57.9030120Z      |
2020-04-12T20:31:57.9030755Z 1918 |         self.partition_dedup_by(|a, b| a == b)
2020-04-12T20:31:57.9031746Z      |              ^^^^^^^^^^^^^^^^^^ ------------- found signature of `fn(_, _) -> _`
2020-04-12T20:31:57.9032575Z      |              |
2020-04-12T20:31:57.9033348Z      |              expected signature of `for<'r, 's> fn(&'r mut T, &'s mut T) -> _`
2020-04-12T20:31:57.9033694Z 
2020-04-12T20:31:57.9034580Z error[E0271]: type mismatch resolving `for<'r, 's> <[closure@src/libcore/slice/mod.rs:1918:33: 1918:46] as ops::function::FnOnce<(&'r mut T, &'s mut T)>>::Output == bool`
2020-04-12T20:31:57.9036224Z      |
2020-04-12T20:31:57.9036224Z      |
2020-04-12T20:31:57.9036797Z 1918 |         self.partition_dedup_by(|a, b| a == b)
2020-04-12T20:31:57.9037721Z      |              ^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter, found concrete lifetime
2020-04-12T20:31:57.9076144Z error[E0631]: type mismatch in closure arguments
2020-04-12T20:31:57.9076830Z     --> src/libcore/slice/mod.rs:2064:14
2020-04-12T20:31:57.9077333Z      |
2020-04-12T20:31:57.9077333Z      |
2020-04-12T20:31:57.9077979Z 2064 |         self.partition_dedup_by(|a, b| key(a) == key(b))
2020-04-12T20:31:57.9079066Z      |              ^^^^^^^^^^^^^^^^^^ ----------------------- found signature of `fn(&mut T, &mut T) -> _`
2020-04-12T20:31:57.9079907Z      |              |
2020-04-12T20:31:57.9080684Z      |              expected signature of `for<'r, 's> fn(&'r mut T, &'s mut T) -> _`
2020-04-12T20:31:57.9081044Z 
2020-04-12T20:31:57.9081921Z error[E0271]: type mismatch resolving `for<'r, 's> <[closure@src/libcore/slice/mod.rs:2064:33: 2064:56 key:_] as ops::function::FnOnce<(&'r mut T, &'s mut T)>>::Output == bool`
2020-04-12T20:31:57.9083325Z      |
2020-04-12T20:31:57.9083325Z      |
2020-04-12T20:31:57.9084071Z 2064 |         self.partition_dedup_by(|a, b| key(a) == key(b))
2020-04-12T20:31:57.9084940Z      |              ^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter, found concrete lifetime
2020-04-12T20:31:57.9229583Z error[E0282]: type annotations needed
2020-04-12T20:31:57.9230190Z     --> src/libcore/slice/mod.rs:2623:28
2020-04-12T20:31:57.9230678Z      |
2020-04-12T20:31:57.9230678Z      |
2020-04-12T20:31:57.9231258Z 2623 |         self.is_sorted_by(|a, b| a.partial_cmp(b))
2020-04-12T20:31:57.9232106Z      |                            ^ consider giving this closure parameter a type
2020-04-12T20:31:57.9233252Z      = note: type must be known at this point
2020-04-12T20:31:57.9233520Z 
2020-04-12T20:31:57.9245926Z error[E0282]: type annotations needed
2020-04-12T20:31:57.9246535Z     --> src/libcore/slice/mod.rs:2638:35
2020-04-12T20:31:57.9246535Z     --> src/libcore/slice/mod.rs:2638:35
2020-04-12T20:31:57.9247000Z      |
2020-04-12T20:31:57.9247615Z 2638 |         self.iter().is_sorted_by(|a, b| compare(*a, *b))
---
2020-04-12T20:32:04.7132360Z expected success, got: exit code: 101
2020-04-12T20:32:04.7143730Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --exclude src/tools/tidy
2020-04-12T20:32:04.7144120Z Build completed unsuccessfully in 0:20:51
2020-04-12T20:32:04.7200375Z == clock drift check ==
2020-04-12T20:32:04.7220189Z   local time: Sun Apr 12 20:32:04 UTC 2020
2020-04-12T20:32:04.8383821Z   network time: Sun, 12 Apr 2020 20:32:04 GMT
2020-04-12T20:32:06.5362725Z 
2020-04-12T20:32:06.5362725Z 
2020-04-12T20:32:06.5427746Z ##[error]Bash exited with code '1'.
2020-04-12T20:32:06.5440953Z ##[section]Finishing: Run build
2020-04-12T20:32:06.5502042Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/71074/merge to s
2020-04-12T20:32:06.5507929Z Task         : Get sources
2020-04-12T20:32:06.5508243Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-04-12T20:32:06.5508554Z Version      : 1.0.0
2020-04-12T20:32:06.5508764Z Author       : Microsoft
2020-04-12T20:32:06.5508764Z Author       : Microsoft
2020-04-12T20:32:06.5509085Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-04-12T20:32:06.5509650Z ==============================================================================
2020-04-12T20:32:06.8619882Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-04-12T20:32:06.8684325Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/71074/merge to s
2020-04-12T20:32:06.8764260Z Cleaning up task key
2020-04-12T20:32:06.8765443Z Start cleaning up orphan processes.
2020-04-12T20:32:06.8932935Z Terminate orphan process: pid (3481) (python)
2020-04-12T20:32:06.9243997Z ##[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)

@eddyb
Copy link
Member

eddyb commented Apr 12, 2020

@mark-i-m It can fail in individual parts of the compiler, but it's the correct thing to pass to with_self_ty, it's just not always not broken 😞.

So I would always try it first then run ./x.py test --stage 1 src/test/ui and hopefully it works.

@mark-i-m
Copy link
Member Author

@eddyb It almost works. src/ui/issues/issue-69841.rs should compile and run-pass. With dummy_trait_object_self, it compiles but fails by running the unreachable code at line 28 of that test.

@eddyb
Copy link
Member

eddyb commented Apr 12, 2020

You're talking about the use site in this PR? Or something else?

@eddyb
Copy link
Member

eddyb commented Apr 12, 2020

@mark-i-m Are you building with system LLVM by any chance? I'm asking because of this:

// This is a regression test for issue rust-lang/rust#69841, which exposed an
// LLVM bug which needed a fix to be backported.

@eddyb
Copy link
Member

eddyb commented Apr 12, 2020

Yeah that test is bugged, I have a commit about it (f4a96c1):

tests: add missing // no-system-llvm annotation to #69841 test.

 // run-pass
+// no-system-llvm

@mark-i-m
Copy link
Member Author

Yes, I am building with system llvm. Hmm... let me push the PR and we can see what CI says. I think that is the only failing test.

@mark-i-m mark-i-m force-pushed the de-abuse-err-3 branch 2 times, most recently from 9594f6e to ba914f1 Compare April 12, 2020 23:59
@@ -893,11 +893,12 @@ impl<'tcx> Constructor<'tcx> {
// Treat all uninhabited types in non-exhaustive variants as
// `TyErr`.
(_, true, true) => cx.tcx.types.err,
// Treat all non-visible fields as `TyErr`. They can't appear
// in any other pattern from this match (because they are
// Treat all non-visible fields as `()`. They can't appear in
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems arbitrary; cc @varkor @Nadrieril

Copy link
Contributor

Choose a reason for hiding this comment

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

On the other hand it says that we are picking some inhabited dummy, so () is as good as any I suppose.

@mark-i-m
Copy link
Member Author

And it results in an ICE:

thread 'rustc' panicked at 'assertion failed: rows.iter().all(|r| r.len() == v.len())', src/librustc_mir_build/hair/pattern/_match.rs:1652:5

@rust-highfive
Copy link
Collaborator

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-04-13T01:34:23.9404747Z ========================== Starting Command Output ===========================
2020-04-13T01:34:23.9407700Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/789bc8bf-54cb-43ce-a872-188f02600e80.sh
2020-04-13T01:34:23.9408105Z 
2020-04-13T01:34:23.9412416Z ##[section]Finishing: Disable git automatic line ending conversion
2020-04-13T01:34:23.9435260Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/71074/merge to s
2020-04-13T01:34:23.9438715Z Task         : Get sources
2020-04-13T01:34:23.9439028Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-04-13T01:34:23.9439342Z Version      : 1.0.0
2020-04-13T01:34:23.9439549Z Author       : Microsoft
---
2020-04-13T01:34:25.1890733Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-04-13T01:34:25.1900208Z ##[command]git config gc.auto 0
2020-04-13T01:34:25.1905119Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-04-13T01:34:25.1909894Z ##[command]git config --get-all http.proxy
2020-04-13T01:34:25.1919743Z ##[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/71074/merge:refs/remotes/pull/71074/merge
---
2020-04-13T01:37:59.7669828Z Looks like docker image is the same as before, not uploading
2020-04-13T01:38:05.4204746Z [CI_JOB_NAME=x86_64-gnu-llvm-7]
2020-04-13T01:38:05.4515168Z [CI_JOB_NAME=x86_64-gnu-llvm-7]
2020-04-13T01:38:05.4547632Z == clock drift check ==
2020-04-13T01:38:05.4557358Z   local time: Mon Apr 13 01:38:05 UTC 2020
2020-04-13T01:38:05.5226629Z   network time: Mon, 13 Apr 2020 01:38:05 GMT
2020-04-13T01:38:05.5251835Z Starting sccache server...
2020-04-13T01:38:05.6108194Z configure: processing command line
2020-04-13T01:38:05.6109504Z configure: 
2020-04-13T01:38:05.6110353Z configure: rust.dist-src        := False
---
2020-04-13T01:43:05.8014270Z    Compiling rustc_feature v0.0.0 (/checkout/src/librustc_feature)
2020-04-13T01:43:07.2023288Z    Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2020-04-13T01:43:08.7279820Z    Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
2020-04-13T01:43:09.7862679Z    Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
2020-04-13T01:43:18.4441049Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-04-13T01:43:20.6864284Z    Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
2020-04-13T01:43:24.9069347Z    Compiling rustc_attr v0.0.0 (/checkout/src/librustc_attr)
2020-04-13T01:43:28.8292321Z    Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2020-04-13T01:43:38.3385682Z    Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
2020-04-13T02:05:21.1458611Z    Compiling rustc_feature v0.0.0 (/checkout/src/librustc_feature)
2020-04-13T02:05:22.8496327Z    Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2020-04-13T02:05:24.7869271Z    Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
2020-04-13T02:05:25.6765167Z    Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
2020-04-13T02:05:36.9157458Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-04-13T02:05:38.9771870Z    Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
2020-04-13T02:05:44.1404049Z    Compiling rustc_attr v0.0.0 (/checkout/src/librustc_attr)
2020-04-13T02:05:49.3657516Z    Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2020-04-13T02:06:01.2455186Z    Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
2020-04-13T02:30:59.7051459Z .................................................................................................... 1700/9891
2020-04-13T02:31:03.9381274Z .................................................................................................... 1800/9891
2020-04-13T02:31:12.4267596Z .................................................................................................... 1900/9891
2020-04-13T02:31:20.6416530Z ....i............................................................................................... 2000/9891
2020-04-13T02:31:27.0051308Z ..............................................................................................iiiii. 2100/9891
2020-04-13T02:31:47.6436193Z .................................................................................................... 2300/9891
2020-04-13T02:31:49.7954820Z .................................................................................................... 2400/9891
2020-04-13T02:31:52.0737117Z .................................................................................................... 2500/9891
2020-04-13T02:31:57.8221360Z .................................................................................................... 2600/9891
---
2020-04-13T02:35:00.1696599Z .................................................................................................... 5100/9891
2020-04-13T02:35:07.5939414Z .................................................................................................... 5200/9891
2020-04-13T02:35:12.6209696Z ..............i..................................................................................... 5300/9891
2020-04-13T02:35:22.1276051Z .................................................................................................... 5400/9891
2020-04-13T02:35:27.3072290Z ....ii.ii........i...i.............................................................................. 5500/9891
2020-04-13T02:35:34.9131997Z ..................................................i................................................. 5700/9891
2020-04-13T02:35:44.7367631Z ......................................................................ii............................ 5800/9891
2020-04-13T02:35:51.1963482Z .........i.......................................................................................... 5900/9891
2020-04-13T02:35:56.6072052Z .................................................................................................... 6000/9891
2020-04-13T02:35:56.6072052Z .................................................................................................... 6000/9891
2020-04-13T02:36:06.7670523Z .................................................................................................... 6100/9891
2020-04-13T02:36:17.5404544Z ...ii...i..ii...........i........................................................................... 6200/9891
2020-04-13T02:36:33.0398443Z .................................................................................................... 6400/9891
2020-04-13T02:36:38.6139233Z .................................................................................................... 6500/9891
2020-04-13T02:36:38.6139233Z .................................................................................................... 6500/9891
2020-04-13T02:36:50.4561828Z .................................i..ii.............................................................. 6600/9891
2020-04-13T02:37:11.2703110Z .................................................................................................... 6800/9891
2020-04-13T02:37:13.2581884Z .................................i.................................................................. 6900/9891
2020-04-13T02:37:15.3261672Z .................................................................................................... 7000/9891
2020-04-13T02:37:17.4629299Z ........................................................................i........................... 7100/9891
---
2020-04-13T02:38:52.9442082Z .................................................................................................... 7800/9891
2020-04-13T02:38:56.8537795Z .................................................................................................... 7900/9891
2020-04-13T02:39:03.7530157Z .................................................................................................... 8000/9891
2020-04-13T02:39:10.0325454Z ......................................i............................................................. 8100/9891
2020-04-13T02:39:19.4221237Z ......................................................................................iiiiii.iiiii.i 8200/9891
2020-04-13T02:39:36.0707843Z ................................i......i............................................................ 8400/9891
2020-04-13T02:39:39.9152588Z .................................................................................................... 8500/9891
2020-04-13T02:39:50.7579958Z .................................................................................................... 8600/9891
2020-04-13T02:40:04.4126841Z .................................................................................................... 8700/9891
---
2020-04-13T02:42:00.4165055Z ---- [ui] ui/issues/issue-46964.rs stdout ----
2020-04-13T02:42:00.4165293Z 
2020-04-13T02:42:00.4165742Z error: test compilation failed although it shouldn't!
2020-04-13T02:42:00.4166015Z status: exit code: 101
2020-04-13T02:42:00.4167976Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-46964.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-46964" "-A" "unused" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-46964/auxiliary"
2020-04-13T02:42:00.4169596Z ------------------------------------------
2020-04-13T02:42:00.4169890Z 
2020-04-13T02:42:00.4170236Z ------------------------------------------
2020-04-13T02:42:00.4170426Z stderr:
2020-04-13T02:42:00.4170426Z stderr:
2020-04-13T02:42:00.4170796Z ------------------------------------------
2020-04-13T02:42:00.4171490Z thread 'rustc' panicked at 'assertion failed: rows.iter().all(|r| r.len() == v.len())', src/librustc_mir_build/hair/pattern/_match.rs:1652:5
2020-04-13T02:42:00.4172235Z 
2020-04-13T02:42:00.4172437Z error: internal compiler error: unexpected panic
2020-04-13T02:42:00.4172621Z 
2020-04-13T02:42:00.4172827Z note: the compiler unexpectedly panicked. this is a bug.
2020-04-13T02:42:00.4172827Z note: the compiler unexpectedly panicked. this is a bug.
2020-04-13T02:42:00.4173027Z 
2020-04-13T02:42:00.4173785Z note: we would appreciate a bug report: ***/blob/master/CONTRIBUTING.md#bug-reports
2020-04-13T02:42:00.4174534Z note: rustc 1.44.0-nightly (8a3c83803 2020-04-13) running on x86_64-unknown-linux-gnu
2020-04-13T02:42:00.4174769Z 
2020-04-13T02:42:00.4174769Z 
2020-04-13T02:42:00.4175537Z note: compiler flags: -Z threads=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z unstable-options -C prefer-dynamic -C rpath -C debuginfo=0
2020-04-13T02:42:00.4175992Z 
2020-04-13T02:42:00.4176363Z ------------------------------------------
2020-04-13T02:42:00.4176536Z 
2020-04-13T02:42:00.4176634Z 
---
2020-04-13T02:42:00.4193393Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
2020-04-13T02:42:00.4193848Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-04-13T02:42:00.4211043Z 
2020-04-13T02:42:00.4211254Z 
2020-04-13T02:42:00.4215809Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-7/bin/FileCheck" "--nodejs" "/usr/bin/node" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "7.0.0" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-04-13T02:42:00.4218666Z 
2020-04-13T02:42:00.4218774Z 
2020-04-13T02:42:00.4222954Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --exclude src/tools/tidy
2020-04-13T02:42:00.4223359Z Build completed unsuccessfully in 1:02:22
2020-04-13T02:42:00.4223359Z Build completed unsuccessfully in 1:02:22
2020-04-13T02:42:00.4275866Z == clock drift check ==
2020-04-13T02:42:00.4295573Z   local time: Mon Apr 13 02:42:00 UTC 2020
2020-04-13T02:42:00.5003404Z   network time: Mon, 13 Apr 2020 02:42:00 GMT
2020-04-13T02:42:01.1993011Z 
2020-04-13T02:42:01.1993011Z 
2020-04-13T02:42:01.2077507Z ##[error]Bash exited with code '1'.
2020-04-13T02:42:01.2091871Z ##[section]Finishing: Run build
2020-04-13T02:42:01.2144262Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/71074/merge to s
2020-04-13T02:42:01.2149479Z Task         : Get sources
2020-04-13T02:42:01.2149832Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-04-13T02:42:01.2150170Z Version      : 1.0.0
2020-04-13T02:42:01.2150410Z Author       : Microsoft
2020-04-13T02:42:01.2150410Z Author       : Microsoft
2020-04-13T02:42:01.2150766Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-04-13T02:42:01.2151194Z ==============================================================================
2020-04-13T02:42:01.5402837Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-04-13T02:42:01.5467997Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/71074/merge to s
2020-04-13T02:42:01.5553562Z Cleaning up task key
2020-04-13T02:42:01.5554821Z Start cleaning up orphan processes.
2020-04-13T02:42:01.5732926Z Terminate orphan process: pid (3673) (python)
2020-04-13T02:42:01.5898923Z ##[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)

(false, ..) => cx.tcx.types.err,
// to know they are uninhabited, so we choose an inhabited
// dummy.
(false, ..) => cx.tcx.types.unit,
Copy link
Member

Choose a reason for hiding this comment

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

Maybe the ICE is because this has a constructor with 0 leaves? You could try some type like u8 I guess.
But I wonder if ty::Error is specially-handled elsewhere in this module.

@Nadrieril
Copy link
Member

Nadrieril commented Apr 13, 2020

Grmbl I new this tyerr hack looked fishy. Ok, it looks like the code uses tyerr to signal something specific: namely that we shouldn't observe uninhabitedness of private fields and non-exhaustive variants. So the correct fix is to return the correct type of the field always in this match https://github.com/mark-i-m/rust/blob/fcf45999f7441721965cb3f07a996d2c11793365/src/librustc_mir_build/hair/pattern/_match.rs#L892 but make the uninhabitedness check aware of private fields or whatever. Replacing tyerr by units or anything else is probably not a good idea.

EDIT: If stage0 ever finishes to compile I'll try some things

@eddyb
Copy link
Member

eddyb commented Apr 13, 2020

Ah, so, the type flows into Pat::wildcard_from_ty. We could put the extra information in Pat.

@Nadrieril
Copy link
Member

Ah, so, the type flows into Pat::wildcard_from_ty. We could put the extra information in Pat.

We could but I don't think that's needed. I believe we already do a lot of the right checks without relying on tyerr being there, so it's just a matter of making sure that's the case.

@mark-i-m
Copy link
Member Author

Btw, if I only change the match block, we fail the following two tests (which IIUC is expected):

  • ui/rfc-2008-non-exhaustive/uninhabited/patterns.rs:
error: unreachable pattern                                                                                                                                                                                         
  --> /home/mark/nobackup/rust3/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns.rs:51:15                                                                                                                  
   |                                                                                                                                                                                                               
LL |     while let PartiallyInhabitedVariants::Struct { x, .. } = partially_inhabited_variant() {                                                                                                                  
   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                    
   |                                                                                                                                                                                                               
note: the lint level is defined here                                                                                                                                                                               
  --> /home/mark/nobackup/rust3/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns.rs:3:9                                                                                                                    
   |                                                                                                                                                                                                               
LL | #![deny(unreachable_patterns)]                                                                                                                                                                                
   |         ^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                  
                                                                                                                                                                                                                   
error: aborting due to previous error 
  • ui/pattern/usefulness/match-privately-empty.rs: compiled successfully but shouldn't

@mark-i-m mark-i-m marked this pull request as draft April 13, 2020 17:09
@Nadrieril
Copy link
Member

@mark-i-m I'm on it ! I think I've found a clean solution to this

@rust-highfive
Copy link
Collaborator

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-04-13T17:05:54.2433408Z ========================== Starting Command Output ===========================
2020-04-13T17:05:54.2436269Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/fb5d6635-bbd1-4ba6-ad4b-7e5717e9facd.sh
2020-04-13T17:05:54.2436459Z 
2020-04-13T17:05:54.2439899Z ##[section]Finishing: Disable git automatic line ending conversion
2020-04-13T17:05:54.2454063Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/71074/merge to s
2020-04-13T17:05:54.2456510Z Task         : Get sources
2020-04-13T17:05:54.2456716Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-04-13T17:05:54.2456952Z Version      : 1.0.0
2020-04-13T17:05:54.2457091Z Author       : Microsoft
---
2020-04-13T17:05:55.5849489Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-04-13T17:05:55.5855227Z ##[command]git config gc.auto 0
2020-04-13T17:05:55.5860468Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-04-13T17:05:55.5863556Z ##[command]git config --get-all http.proxy
2020-04-13T17:05:55.5869616Z ##[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/71074/merge:refs/remotes/pull/71074/merge
---
2020-04-13T17:09:32.6991709Z Looks like docker image is the same as before, not uploading
2020-04-13T17:09:35.8171786Z [CI_JOB_NAME=x86_64-gnu-llvm-7]
2020-04-13T17:09:35.8432132Z [CI_JOB_NAME=x86_64-gnu-llvm-7]
2020-04-13T17:09:35.8459245Z == clock drift check ==
2020-04-13T17:09:35.8480772Z   local time: Mon Apr 13 17:09:35 UTC 2020
2020-04-13T17:09:36.1182915Z   network time: Mon, 13 Apr 2020 17:09:36 GMT
2020-04-13T17:09:36.1209602Z Starting sccache server...
2020-04-13T17:09:36.1903708Z configure: processing command line
2020-04-13T17:09:36.1903955Z configure: 
2020-04-13T17:09:36.1908676Z configure: rust.dist-src        := False
---
2020-04-13T17:14:02.2045550Z    Compiling rustc_feature v0.0.0 (/checkout/src/librustc_feature)
2020-04-13T17:14:03.4398994Z    Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2020-04-13T17:14:04.7933380Z    Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
2020-04-13T17:14:06.5416891Z    Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
2020-04-13T17:14:13.6647127Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-04-13T17:14:16.3255594Z    Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
2020-04-13T17:14:20.1828684Z    Compiling rustc_attr v0.0.0 (/checkout/src/librustc_attr)
2020-04-13T17:14:23.8114342Z    Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2020-04-13T17:14:31.3900189Z    Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
2020-04-13T17:33:45.3329942Z    Compiling rustc_feature v0.0.0 (/checkout/src/librustc_feature)
2020-04-13T17:33:46.8617086Z    Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2020-04-13T17:33:48.5600952Z    Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
2020-04-13T17:33:51.1968076Z    Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
2020-04-13T17:33:59.2286043Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-04-13T17:34:03.1276616Z    Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
2020-04-13T17:34:07.8279436Z    Compiling rustc_attr v0.0.0 (/checkout/src/librustc_attr)
2020-04-13T17:34:12.4790706Z    Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2020-04-13T17:34:20.4688833Z    Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
2020-04-13T17:56:02.9998727Z .................................................................................................... 1700/9891
2020-04-13T17:56:06.5348969Z .................................................................................................... 1800/9891
2020-04-13T17:56:13.6776746Z .................................................................................................... 1900/9891
2020-04-13T17:56:20.6377787Z ....i............................................................................................... 2000/9891
2020-04-13T17:56:25.9201877Z ..............................................................................................iiiii. 2100/9891
2020-04-13T17:56:43.4047985Z .................................................................................................... 2300/9891
2020-04-13T17:56:45.1182681Z .................................................................................................... 2400/9891
2020-04-13T17:56:46.9190439Z .................................................................................................... 2500/9891
2020-04-13T17:56:51.5753328Z .................................................................................................... 2600/9891
---
2020-04-13T17:59:21.5131786Z .................................................................................................... 5100/9891
2020-04-13T17:59:27.9097117Z .................................................................................................... 5200/9891
2020-04-13T17:59:32.1305737Z ..............i..................................................................................... 5300/9891
2020-04-13T17:59:40.2249383Z .................................................................................................... 5400/9891
2020-04-13T17:59:44.5864492Z ....ii.ii........i...i.............................................................................. 5500/9891
2020-04-13T17:59:50.8965920Z ..................................................i................................................. 5700/9891
2020-04-13T17:59:59.3547799Z ......................................................................ii............................ 5800/9891
2020-04-13T18:00:04.7715546Z .........i.......................................................................................... 5900/9891
2020-04-13T18:00:09.3837229Z .................................................................................................... 6000/9891
2020-04-13T18:00:09.3837229Z .................................................................................................... 6000/9891
2020-04-13T18:00:17.8444942Z .................................................................................................... 6100/9891
2020-04-13T18:00:27.3413092Z ...ii...i..ii............i.......................................................................... 6200/9891
2020-04-13T18:00:39.6704079Z .................................................................................................... 6400/9891
2020-04-13T18:00:44.6678348Z .................................................................................................... 6500/9891
2020-04-13T18:00:44.6678348Z .................................................................................................... 6500/9891
2020-04-13T18:00:59.1773591Z .................................i..ii.............................................................. 6600/9891
2020-04-13T18:01:16.8740512Z .................................................................................................... 6800/9891
2020-04-13T18:01:18.4961456Z .................................i.................................................................. 6900/9891
2020-04-13T18:01:20.5220097Z .................................................................................................... 7000/9891
2020-04-13T18:01:22.2607070Z ........................................................................i........................... 7100/9891
---
2020-04-13T18:02:44.8437871Z .................................................................................................... 7800/9891
2020-04-13T18:02:48.2824892Z .................................................................................................... 7900/9891
2020-04-13T18:02:53.6664895Z ............................................................F....................................... 8000/9891
2020-04-13T18:02:59.1164839Z ......................................i............................................................. 8100/9891
2020-04-13T18:03:06.6835380Z ......................................................................................iiiiii.iiiii.i 8200/9891
2020-04-13T18:03:19.7020025Z ................................i......i............................................................ 8400/9891
2020-04-13T18:03:22.4837661Z .................................................................................................... 8500/9891
2020-04-13T18:03:31.2568950Z .................................................................................................... 8600/9891
2020-04-13T18:03:42.1567260Z .................................................................................................... 8700/9891
---
2020-04-13T18:05:22.6743193Z ---- [ui] ui/pattern/usefulness/match-privately-empty.rs stdout ----
2020-04-13T18:05:22.6743537Z 
2020-04-13T18:05:22.6743816Z error: ui test compiled successfully!
2020-04-13T18:05:22.6744089Z status: exit code: 0
2020-04-13T18:05:22.6745744Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/pattern/usefulness/match-privately-empty.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/pattern/usefulness/match-privately-empty" "-A" "unused" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/pattern/usefulness/match-privately-empty/auxiliary"
2020-04-13T18:05:22.6747476Z ------------------------------------------
2020-04-13T18:05:22.6747744Z 
2020-04-13T18:05:22.6748170Z ------------------------------------------
2020-04-13T18:05:22.6748475Z stderr:
---
2020-04-13T18:05:22.6750644Z ---- [ui] ui/rfc-2008-non-exhaustive/uninhabited/patterns.rs stdout ----
2020-04-13T18:05:22.6750962Z 
2020-04-13T18:05:22.6751405Z error: test compilation failed although it shouldn't!
2020-04-13T18:05:22.6751722Z status: exit code: 1
2020-04-13T18:05:22.6753327Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns" "-A" "unused" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns/auxiliary"
2020-04-13T18:05:22.6754827Z ------------------------------------------
2020-04-13T18:05:22.6755087Z 
2020-04-13T18:05:22.6755506Z ------------------------------------------
2020-04-13T18:05:22.6755792Z stderr:
2020-04-13T18:05:22.6755792Z stderr:
2020-04-13T18:05:22.6757123Z ------------------------------------------
2020-04-13T18:05:22.6757953Z error: unreachable pattern
2020-04-13T18:05:22.6758708Z   --> /checkout/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns.rs:51:15
2020-04-13T18:05:22.6759231Z    |
2020-04-13T18:05:22.6759583Z LL |     while let PartiallyInhabitedVariants::Struct { x, .. } = partially_inhabited_variant() {
2020-04-13T18:05:22.6760285Z    |
2020-04-13T18:05:22.6760523Z note: the lint level is defined here
2020-04-13T18:05:22.6761105Z   --> /checkout/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns.rs:3:9
2020-04-13T18:05:22.6761455Z    |
---
2020-04-13T18:05:22.6769655Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
2020-04-13T18:05:22.6770211Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-04-13T18:05:22.6784008Z 
2020-04-13T18:05:22.6784545Z 
2020-04-13T18:05:22.6795996Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-7/bin/FileCheck" "--nodejs" "/usr/bin/node" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "7.0.0" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-04-13T18:05:22.6799065Z 
2020-04-13T18:05:22.6799168Z 
2020-04-13T18:05:22.6799754Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --exclude src/tools/tidy
2020-04-13T18:05:22.6800311Z Build completed unsuccessfully in 0:54:26
2020-04-13T18:05:22.6800311Z Build completed unsuccessfully in 0:54:26
2020-04-13T18:05:22.6847656Z == clock drift check ==
2020-04-13T18:05:22.6862397Z   local time: Mon Apr 13 18:05:22 UTC 2020
2020-04-13T18:05:23.2347842Z   network time: Mon, 13 Apr 2020 18:05:23 GMT
2020-04-13T18:05:23.9580776Z 
2020-04-13T18:05:23.9580776Z 
2020-04-13T18:05:23.9653671Z ##[error]Bash exited with code '1'.
2020-04-13T18:05:23.9665534Z ##[section]Finishing: Run build
2020-04-13T18:05:23.9701824Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/71074/merge to s
2020-04-13T18:05:23.9706012Z Task         : Get sources
2020-04-13T18:05:23.9706251Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-04-13T18:05:23.9706499Z Version      : 1.0.0
2020-04-13T18:05:23.9706655Z Author       : Microsoft
2020-04-13T18:05:23.9706655Z Author       : Microsoft
2020-04-13T18:05:23.9706901Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-04-13T18:05:23.9707200Z ==============================================================================
2020-04-13T18:05:24.2497432Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-04-13T18:05:24.2538784Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/71074/merge to s
2020-04-13T18:05:24.2614980Z Cleaning up task key
2020-04-13T18:05:24.2615999Z Start cleaning up orphan processes.
2020-04-13T18:05:24.2881517Z Terminate orphan process: pid (3746) (python)
2020-04-13T18:05:24.2928266Z ##[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)

@Nadrieril
Copy link
Member

That's what I have so far: master...Nadrieril:exhaustiveness-remove-tyerr .
I've reduced the problem to a simpler case: now we only use tyerr in the case where a struct has private empty fields, because we don't want users outside the crate to know that the struct is uninhabited. (There's also something about non_exhaustive, but same thing here).
The fix looks super easy: simply skip over those fields as if they never existed. But in practice there are so many places in the code where that would matter and I see no clean way of making sure that I get it right and that people in the future will get it right too ><. It's all the places where one of ty::Adt, Constructor::Variant/Simple or PatKind::Variant/Leaf appear, essentially. If anyone has an idea of how to get that right, I'm feeling stuck right now.

@mark-i-m
Copy link
Member Author

mark-i-m commented Apr 14, 2020

@Nadrieril does it make sense to wrap those structs with some other struct that forces you to decide whether to see fields or not?

EDIT: created this zulip thread to discuss more: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/uninhabitedness.20check

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-8 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-04-19T03:28:40.4746007Z ========================== Starting Command Output ===========================
2020-04-19T03:28:40.4750851Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/fd42af69-3f9c-4eac-b646-6fd7c0d33116.sh
2020-04-19T03:28:40.4751339Z 
2020-04-19T03:28:40.4756241Z ##[section]Finishing: Disable git automatic line ending conversion
2020-04-19T03:28:40.4775125Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/71074/merge to s
2020-04-19T03:28:40.4778879Z Task         : Get sources
2020-04-19T03:28:40.4779163Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-04-19T03:28:40.4779424Z Version      : 1.0.0
2020-04-19T03:28:40.4779606Z Author       : Microsoft
---
2020-04-19T03:28:41.6352251Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-04-19T03:28:41.6360820Z ##[command]git config gc.auto 0
2020-04-19T03:28:41.6367224Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-04-19T03:28:41.6376328Z ##[command]git config --get-all http.proxy
2020-04-19T03:28:41.6388867Z ##[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/71074/merge:refs/remotes/pull/71074/merge
---
2020-04-19T03:32:00.4629912Z  ---> 318032b5f0e2
2020-04-19T03:32:00.4630794Z 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-19T03:32:00.4637247Z  ---> Using cache
2020-04-19T03:32:00.4637681Z  ---> d44a858fd1ce
2020-04-19T03:32:00.4638746Z 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-19T03:32:00.4646356Z  ---> 58b910f50f5a
2020-04-19T03:32:00.4646569Z Step 7/8 : ENV NO_DEBUG_ASSERTIONS=1
2020-04-19T03:32:00.4651735Z  ---> Using cache
2020-04-19T03:32:00.4652121Z  ---> ee7702aadba1
---
2020-04-19T03:32:00.5548404Z Looks like docker image is the same as before, not uploading
2020-04-19T03:32:08.9859200Z [CI_JOB_NAME=x86_64-gnu-llvm-8]
2020-04-19T03:32:09.0222790Z [CI_JOB_NAME=x86_64-gnu-llvm-8]
2020-04-19T03:32:09.0262240Z == clock drift check ==
2020-04-19T03:32:09.0271162Z   local time: Sun Apr 19 03:32:09 UTC 2020
2020-04-19T03:32:09.1182192Z   network time: Sun, 19 Apr 2020 03:32:09 GMT
2020-04-19T03:32:09.1208785Z Starting sccache server...
2020-04-19T03:32:09.2088682Z configure: processing command line
2020-04-19T03:32:09.2088963Z configure: 
2020-04-19T03:32:09.2089964Z configure: rust.dist-src        := False
---
2020-04-19T03:38:04.3539307Z    Compiling rustc_feature v0.0.0 (/checkout/src/librustc_feature)
2020-04-19T03:38:06.0742130Z    Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2020-04-19T03:38:07.8525779Z    Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
2020-04-19T03:38:09.8851877Z    Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
2020-04-19T03:38:19.1949348Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-04-19T03:38:22.9919488Z    Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
2020-04-19T03:38:27.9810412Z    Compiling rustc_attr v0.0.0 (/checkout/src/librustc_attr)
2020-04-19T03:38:32.7426276Z    Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2020-04-19T03:38:42.3408585Z    Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
2020-04-19T04:03:23.2614386Z    Compiling rustc_feature v0.0.0 (/checkout/src/librustc_feature)
2020-04-19T04:03:25.0563178Z    Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2020-04-19T04:03:27.0153026Z    Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
2020-04-19T04:03:27.6288318Z    Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
2020-04-19T04:03:38.6347790Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-04-19T04:03:41.7656817Z    Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
2020-04-19T04:03:46.9612440Z    Compiling rustc_attr v0.0.0 (/checkout/src/librustc_attr)
2020-04-19T04:03:51.8091602Z    Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2020-04-19T04:04:02.6170773Z    Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
2020-04-19T04:29:08.0449542Z .................................................................................................... 1700/9907
2020-04-19T04:29:12.2801009Z .................................................................................................... 1800/9907
2020-04-19T04:29:21.3110387Z ..................................................................................................i. 1900/9907
2020-04-19T04:29:29.4579356Z .................................................................................................... 2000/9907
2020-04-19T04:29:35.9044163Z ........................................................................................iiiii....... 2100/9907
2020-04-19T04:29:56.8412977Z .................................................................................................... 2300/9907
2020-04-19T04:29:59.0780345Z .................................................................................................... 2400/9907
2020-04-19T04:30:01.4133772Z .................................................................................................... 2500/9907
2020-04-19T04:30:07.5666669Z .................................................................................................... 2600/9907
---
2020-04-19T04:33:03.1083927Z ................................................................i...............i................... 5000/9907
2020-04-19T04:33:10.6896045Z .................................................................................................... 5100/9907
2020-04-19T04:33:17.8431640Z .................................................................................................... 5200/9907
2020-04-19T04:33:23.0487833Z ..........i......................................................................................... 5300/9907
2020-04-19T04:33:33.0424370Z i................................................................................................... 5400/9907
2020-04-19T04:33:38.5229425Z ii.ii........i...i.................................................................................. 5500/9907
2020-04-19T04:33:45.8229211Z ...............................................i.................................................... 5700/9907
2020-04-19T04:33:55.1396602Z ...............................................................................ii................... 5800/9907
2020-04-19T04:34:02.3522641Z ..................i................................................................................. 5900/9907
2020-04-19T04:34:07.8641431Z .................................................................................................... 6000/9907
2020-04-19T04:34:07.8641431Z .................................................................................................... 6000/9907
2020-04-19T04:34:18.7091381Z .................................................................................................... 6100/9907
2020-04-19T04:34:29.3541071Z ............ii...i...ii..........i.................................................................. 6200/9907
2020-04-19T04:34:45.3307513Z .................................................................................................... 6400/9907
2020-04-19T04:34:52.2063099Z .................................................................................................... 6500/9907
2020-04-19T04:34:52.2063099Z .................................................................................................... 6500/9907
2020-04-19T04:35:08.7771170Z ..........................................i..ii..................................................... 6600/9907
2020-04-19T04:35:31.5889034Z .................................................................................................... 6800/9907
2020-04-19T04:35:33.8132088Z ...........................................i........................................................ 6900/9907
2020-04-19T04:35:35.9573202Z .................................................................................................... 7000/9907
2020-04-19T04:35:38.1687558Z ...................................................................................i................ 7100/9907
---
2020-04-19T04:37:14.6760723Z .................................................................................................... 7800/9907
2020-04-19T04:37:19.3375235Z .................................................................................................... 7900/9907
2020-04-19T04:37:25.9675491Z .......................................................................F............................ 8000/9907
2020-04-19T04:37:31.8831621Z .................................................i.................................................. 8100/9907
2020-04-19T04:37:42.0225262Z ..................................................................................................ii 8200/9907
2020-04-19T04:37:47.4226481Z iiii.iiiii.i........................................................................................ 8300/9907
2020-04-19T04:38:01.3281168Z .................................................................................................... 8500/9907
2020-04-19T04:38:09.6724607Z .................................................................................................... 8600/9907
2020-04-19T04:38:23.8653010Z .................................................................................................... 8700/9907
2020-04-19T04:38:30.8689753Z .................................................................................................... 8800/9907
---
2020-04-19T04:40:23.1315476Z ---- [ui] ui/pattern/usefulness/match-privately-empty.rs stdout ----
2020-04-19T04:40:23.1315734Z 
2020-04-19T04:40:23.1315943Z error: ui test compiled successfully!
2020-04-19T04:40:23.1316162Z status: exit code: 0
2020-04-19T04:40:23.1318566Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/pattern/usefulness/match-privately-empty.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/pattern/usefulness/match-privately-empty" "-A" "unused" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/pattern/usefulness/match-privately-empty/auxiliary"
2020-04-19T04:40:23.1320493Z ------------------------------------------
2020-04-19T04:40:23.1320662Z 
2020-04-19T04:40:23.1321022Z ------------------------------------------
2020-04-19T04:40:23.1321216Z stderr:
---
2020-04-19T04:40:23.1322805Z ---- [ui] ui/rfc-2008-non-exhaustive/uninhabited/patterns.rs stdout ----
2020-04-19T04:40:23.1323014Z 
2020-04-19T04:40:23.1324144Z error: test compilation failed although it shouldn't!
2020-04-19T04:40:23.1324409Z status: exit code: 1
2020-04-19T04:40:23.1326426Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns" "-A" "unused" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns/auxiliary"
2020-04-19T04:40:23.1327977Z ------------------------------------------
2020-04-19T04:40:23.1328156Z 
2020-04-19T04:40:23.1328510Z ------------------------------------------
2020-04-19T04:40:23.1328699Z stderr:
2020-04-19T04:40:23.1328699Z stderr:
2020-04-19T04:40:23.1329275Z ------------------------------------------
2020-04-19T04:40:23.1329513Z error: unreachable pattern
2020-04-19T04:40:23.1330068Z   --> /checkout/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns.rs:51:15
2020-04-19T04:40:23.1330351Z    |
2020-04-19T04:40:23.1330648Z LL |     while let PartiallyInhabitedVariants::Struct { x, .. } = partially_inhabited_variant() {
2020-04-19T04:40:23.1331261Z    |
2020-04-19T04:40:23.1331436Z note: the lint level is defined here
2020-04-19T04:40:23.1331958Z   --> /checkout/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns.rs:3:9
2020-04-19T04:40:23.1332222Z    |
---
2020-04-19T04:40:23.1351244Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
2020-04-19T04:40:23.1351646Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-04-19T04:40:23.1373113Z 
2020-04-19T04:40:23.1373270Z 
2020-04-19T04:40:23.1377455Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-8/bin/FileCheck" "--nodejs" "/usr/bin/node" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "8.0.0" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-04-19T04:40:23.1380114Z 
2020-04-19T04:40:23.1380221Z 
2020-04-19T04:40:23.1383564Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --exclude src/tools/tidy
2020-04-19T04:40:23.1384024Z Build completed unsuccessfully in 1:06:21
2020-04-19T04:40:23.1384024Z Build completed unsuccessfully in 1:06:21
2020-04-19T04:40:23.1453044Z == clock drift check ==
2020-04-19T04:40:23.1471674Z   local time: Sun Apr 19 04:40:23 UTC 2020
2020-04-19T04:40:23.4764702Z   network time: Sun, 19 Apr 2020 04:40:23 GMT
2020-04-19T04:40:24.1095128Z 
2020-04-19T04:40:24.1095128Z 
2020-04-19T04:40:24.1170110Z ##[error]Bash exited with code '1'.
2020-04-19T04:40:24.1185179Z ##[section]Finishing: Run build
2020-04-19T04:40:24.1232174Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/71074/merge to s
2020-04-19T04:40:24.1239317Z Task         : Get sources
2020-04-19T04:40:24.1239639Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-04-19T04:40:24.1239966Z Version      : 1.0.0
2020-04-19T04:40:24.1240195Z Author       : Microsoft
2020-04-19T04:40:24.1240195Z Author       : Microsoft
2020-04-19T04:40:24.1240528Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-04-19T04:40:24.1241028Z ==============================================================================
2020-04-19T04:40:24.4957352Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-04-19T04:40:24.5006324Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/71074/merge to s
2020-04-19T04:40:24.5116175Z Cleaning up task key
2020-04-19T04:40:24.5117638Z Start cleaning up orphan processes.
2020-04-19T04:40:24.5343498Z Terminate orphan process: pid (3731) (python)
2020-04-19T04:40:24.5574555Z ##[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)

@mark-i-m
Copy link
Member Author

Status update: I rebased to keep the PR up to date, but we have hit a hard roadblock with this problem: #71074 (comment)

@mark-i-m
Copy link
Member Author

I've pulled in @Nadrieril's commits from their branch (@Nadrieril I can also just give you direct access to this branch if you want).

@bors
Copy link
Contributor

bors commented Apr 25, 2020

☔ The latest upstream changes (presumably #71556) made this pull request unmergeable. Please resolve the merge conflicts.

@mark-i-m mark-i-m closed this May 6, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request May 21, 2020
…, r=varkor

De-abuse TyKind::Error in exhaustiveness checking

Replaces rust-lang#71074. Context: rust-lang#70866.

In order to remove the use of `TyKind::Error`, I had to make sure we skip over those fields whose inhabitedness should not be observed. This is potentially error-prone however, since we must be careful not to mix filtered and unfiltered lists of patterns. I managed to hide away most of the filtering behind a new `Fields` struct, that I used everywhere relevant. I quite like the result; I think the twin concepts of `Constructor` and `Fields` make a good mental model.

As usual, I tried to separate commits that shuffle code around from commits that require more thought to review.

cc @varkor @Centril
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.

None yet

6 participants