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

Proposal: fold_self and try_fold_self for Iterators #65222

Merged
merged 4 commits into from
Mar 27, 2020

Conversation

Lucretiel
Copy link
Contributor

This pull request proposes & implements two new methods on Iterators: fold_self and try_fold_self. These are variants of fold and try_fold that use the first element in the iterator as the initial accumulator.

Let me know if a public feature like this requires an RFC, or if this pull request is sufficient as place for discussion.

@rust-highfive
Copy link
Collaborator

r? @KodrAus

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 8, 2019
@Lucretiel
Copy link
Contributor Author

This is a retry of #60103, which I wasn't able to work on before it was closed for inactivity

@rust-highfive
Copy link
Collaborator

The job mingw-check 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.
2019-10-08T20:54:11.9250577Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-10-08T20:54:11.9449566Z ##[command]git config gc.auto 0
2019-10-08T20:54:11.9516487Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-10-08T20:54:11.9580236Z ##[command]git config --get-all http.proxy
2019-10-08T20:54:11.9720184Z ##[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/65222/merge:refs/remotes/pull/65222/merge
---
2019-10-08T21:00:19.5937819Z    Compiling cmake v0.1.38
2019-10-08T21:00:22.2408069Z error: variable does not need to be mutable
2019-10-08T21:00:22.2408429Z     --> src/libcore/iter/traits/iterator.rs:1731:39
2019-10-08T21:00:22.2408661Z      |
2019-10-08T21:00:22.2409001Z 1731 |     fn try_fold_self<F, R>(&mut self, mut f: F) -> Option<R>
2019-10-08T21:00:22.2409699Z      |                                       |
2019-10-08T21:00:22.2410015Z      |                                       help: remove this `mut`
2019-10-08T21:00:22.2410252Z      |
2019-10-08T21:00:22.2410559Z      = note: `-D unused-mut` implied by `-D warnings`
2019-10-08T21:00:22.2410559Z      = note: `-D unused-mut` implied by `-D warnings`
2019-10-08T21:00:22.2410600Z 
2019-10-08T21:00:22.2457110Z error: variable does not need to be mutable
2019-10-08T21:00:22.2457429Z     --> src/libcore/iter/traits/iterator.rs:1888:31
2019-10-08T21:00:22.2457689Z      |
2019-10-08T21:00:22.2457997Z 1888 |     fn fold_self<F>(mut self, mut f: F) -> Option<Self::Item>
2019-10-08T21:00:22.2459014Z      |                               |
2019-10-08T21:00:22.2459320Z      |                               help: remove this `mut`
2019-10-08T21:00:22.2459360Z 
2019-10-08T21:00:22.5164048Z    Compiling compiler_builtins v0.1.18
---
2019-10-08T21:00:25.0346879Z == clock drift check ==
2019-10-08T21:00:25.0363935Z   local time: Tue Oct  8 21:00:25 UTC 2019
2019-10-08T21:00:25.1350783Z   network time: Tue, 08 Oct 2019 21:00:25 GMT
2019-10-08T21:00:25.1351843Z == end clock drift check ==
2019-10-08T21:00:37.4745601Z ##[error]Bash exited with code '1'.
2019-10-08T21:00:37.4787879Z ##[section]Starting: Checkout
2019-10-08T21:00:37.4790296Z ==============================================================================
2019-10-08T21:00:37.4790352Z Task         : Get sources
2019-10-08T21:00:37.4790401Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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

@cuviper
Copy link
Member

cuviper commented Oct 8, 2019

On naming, fold1 has more precedent as mentioned in #60103 (comment).

We even have this helper function locally, used in min_by and max_by:

/// Fold an iterator without having to provide an initial value.
#[inline]
fn fold1<I, F>(mut it: I, f: F) -> Option<I::Item>
where
I: Iterator,
F: FnMut(I::Item, I::Item) -> I::Item,
{
// start with the first element as our selection. This avoids
// having to use `Option`s inside the loop, translating to a
// sizeable performance gain (6x in one case).
let first = it.next()?;
Some(it.fold(first, f))
}

That implementation also matches how I would write this, rather than using Option::map.

@Lucretiel
Copy link
Contributor Author

Lucretiel commented Oct 8, 2019

On naming, fold1 has more precedent as mentioned in [#60103 (comment)]

I saw that, but it didn't seem to be a very "rusty" name. I'm happy to be convinced, but my experience with the rust stdlib has been that it tends to use the more "plain" name in public methods.

That implementation also matches how I would write this, rather than using Option::map.

Can you elaborate on why? This seems like a platonically ideal use case for map; why avoid it?

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 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.
2019-10-08T21:30:16.0316650Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-10-08T21:30:16.0557726Z ##[command]git config gc.auto 0
2019-10-08T21:30:16.0612012Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-10-08T21:30:16.7892906Z ##[command]git config --get-all http.proxy
2019-10-08T21:30:16.7901860Z ##[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/65222/merge:refs/remotes/pull/65222/merge
---
2019-10-08T21:37:15.3485061Z    Compiling serde_json v1.0.40
2019-10-08T21:37:17.2088709Z    Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
2019-10-08T21:37:28.9645060Z     Finished release [optimized] target(s) in 1m 33s
2019-10-08T21:37:28.9732997Z tidy check
2019-10-08T21:37:29.7303798Z tidy error: /checkout/src/libcore/iter/traits/iterator.rs: too many lines (3055) (add `// ignore-tidy-filelength` to the file to suppress this error)
2019-10-08T21:37:31.0899737Z some tidy checks failed
2019-10-08T21:37:31.0902804Z 
2019-10-08T21:37:31.0902804Z 
2019-10-08T21:37:31.0903994Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor"
2019-10-08T21:37:31.0904457Z 
2019-10-08T21:37:31.0904632Z 
2019-10-08T21:37:31.0910354Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-10-08T21:37:31.0910619Z Build completed unsuccessfully in 0:01:36
2019-10-08T21:37:31.0910619Z Build completed unsuccessfully in 0:01:36
2019-10-08T21:37:31.0963026Z == clock drift check ==
2019-10-08T21:37:31.0978960Z   local time: Tue Oct  8 21:37:31 UTC 2019
2019-10-08T21:37:31.1835808Z   network time: Tue, 08 Oct 2019 21:37:31 GMT
2019-10-08T21:37:31.1835929Z == end clock drift check ==
2019-10-08T21:37:32.5183247Z ##[error]Bash exited with code '1'.
2019-10-08T21:37:32.5237744Z ##[section]Starting: Checkout
2019-10-08T21:37:32.5239549Z ==============================================================================
2019-10-08T21:37:32.5239599Z Task         : Get sources
2019-10-08T21:37:32.5239661Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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

@cuviper
Copy link
Member

cuviper commented Oct 8, 2019

I saw that, but it didn't seem to be a very "rusty" name. I'm happy to be convinced, but my experience with the rust stdlib has been that it tends to use the more "plain" name in public methods.

Sure, plain names are preferred, but I didn't know what fold_self was going to do until I read the description. At least fold1 has meaning to folks who have seen that elsewhere, like in Haskell. A plain translation might be fold_one, or maybe fold_first is more intuitive.

This seems like a platonically ideal use case for map; why avoid it?

It's also a good use case for the ? operator, and avoids an iterator-generic closure per #62429.

@Centril
Copy link
Contributor

Centril commented Oct 8, 2019

I would tend to agree that fold_self is not suggestive of what this operation does -- tho this is not exactly fold1 :: (a -> a -> a) -> [a] -> a either but rather fold1 :: (a -> a -> a) -> [a] -> Maybe a (which is what I would have really wanted from Prelude really).

@KodrAus
Copy link
Contributor

KodrAus commented Oct 10, 2019

Hi @Lucretiel 👋

Thanks for the PR! Do you have any examples of real-world code that you think is improved by adding these new methods?

@Lucretiel
Copy link
Contributor Author

Lucretiel commented Oct 11, 2019

Sure, plain names are preferred, but I didn't know what fold_self was going to do until I read the description. At least fold1 has meaning to folks who have seen that elsewhere, like in Haskell. A plain translation might be fold_one, or maybe fold_first is more intuitive.

Changed to fold_first, which I agree makes more sense as a plain name. I like it much better than fold1.

It's also a good use case for the ? operator, and avoids an iterator-generic closure per #62429.

Changed to ? to avoid the closure. The first thing I tried was Some(self.fold(self.next()?, f)), but that failed with a lifetime issue (double mutable borrow of self), which seems to me like an NLL failure?

Thanks for the PR! Do you have any examples of real-world code that you think is improved by adding these new methods?

I wish I could find them; I originally wrote this PR way back in spring, and I can't recall what I was doing back then. I think it was a statistics thing? Certainly it applies in any case where you need to compare each element in the collection; we have min_by and max_by for those specific cases, but this method provides a more general one.

To be honest, I think that fold_first will have much more of a use than try_fold_first; I really only added the latter for parity with try_fold, try_for_each, etc.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 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.
2019-10-11T03:03:25.5422768Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-10-11T03:03:25.5535141Z ##[command]git config gc.auto 0
2019-10-11T03:03:25.5633817Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-10-11T03:03:25.5705074Z ##[command]git config --get-all http.proxy
2019-10-11T03:03:25.5853145Z ##[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/65222/merge:refs/remotes/pull/65222/merge
---
2019-10-11T03:09:39.8174004Z    Compiling serde_json v1.0.40
2019-10-11T03:09:41.7155909Z    Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
2019-10-11T03:09:53.6923241Z     Finished release [optimized] target(s) in 1m 33s
2019-10-11T03:09:53.7016654Z tidy check
2019-10-11T03:09:54.8489548Z tidy error: /checkout/src/libcore/iter/traits/iterator.rs: too many lines (3043) (add `// ignore-tidy-filelength` to the file to suppress this error)
2019-10-11T03:09:56.2570936Z Found 482 error codes
2019-10-11T03:09:56.2571284Z Found 0 error codes with no tests
2019-10-11T03:09:56.2571334Z Done!
2019-10-11T03:09:56.2571380Z some tidy checks failed
2019-10-11T03:09:56.2571380Z some tidy checks failed
2019-10-11T03:09:56.2571413Z 
2019-10-11T03:09:56.2571467Z 
2019-10-11T03:09:56.2576452Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor"
2019-10-11T03:09:56.2576651Z 
2019-10-11T03:09:56.2576671Z 
2019-10-11T03:09:56.2587787Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-10-11T03:09:56.2587898Z Build completed unsuccessfully in 0:01:37
2019-10-11T03:09:56.2587898Z Build completed unsuccessfully in 0:01:37
2019-10-11T03:09:56.2643256Z == clock drift check ==
2019-10-11T03:09:56.2665049Z   local time: Fri Oct 11 03:09:56 UTC 2019
2019-10-11T03:09:56.4184295Z   network time: Fri, 11 Oct 2019 03:09:56 GMT
2019-10-11T03:09:56.4189488Z == end clock drift check ==
2019-10-11T03:09:57.2132799Z ##[error]Bash exited with code '1'.
2019-10-11T03:09:57.2180847Z ##[section]Starting: Checkout
2019-10-11T03:09:57.2183463Z ==============================================================================
2019-10-11T03:09:57.2184493Z Task         : Get sources
2019-10-11T03:09:57.2184571Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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

@Lucretiel
Copy link
Contributor Author

That error appears to be related to tidy being unhappy at how big iterator.rs is?

@wirelessringo
Copy link

Ping from triage. @KodrAus any updates on this? Thanks.

@bluss
Copy link
Member

bluss commented Oct 18, 2019

If there is no proposed use case for try_fold_first, can it be skipped?

For the tidy error, barring splitting the file now, there is an opt-out of the warning you can apply, adding // ignore-tidy-filelength in the file (see other source files with this incantation).

I don't think fold_first is a self-explanatory name, but I only have fold1 to offer from plain being used to that, and it's not better.

We have two differences between fold_first and fold:

  1. fold_first is limited to producing Self::Item
  2. The handling of empty iterators with Option

So we could take either 1 or 2 as starting point for a name.

@Centril
Copy link
Contributor

Centril commented Oct 19, 2019

Please try to split the file in a PR before this one. We have the tidy lint for a reason.

@cuviper
Copy link
Member

cuviper commented Oct 19, 2019

There's very little room to split that file -- all but about 50 lines is consumed by the atypically huge trait Iterator and all of its documentation. If anything deserves an exception, I think this does.

@Centril
Copy link
Contributor

Centril commented Oct 19, 2019

Aw -- fair point; well lets use the exception in this case then.

@JohnCSimon
Copy link
Member

JohnCSimon commented Oct 26, 2019

Ping from triage - the PR has sat idle for a week - and the build has failed. Any updates on this?
@cuviper @Centril @Lucretiel @KodrAus

@JohnCSimon JohnCSimon added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 2, 2019
@JohnCSimon
Copy link
Member

Ping from triage - the PR has sat idle for a week - and the build has failed. Any updates on this?
@cuviper @Centril @Lucretiel @KodrAus

@KodrAus
Copy link
Contributor

KodrAus commented Nov 3, 2019

The build failure here is because of the tidy check. So what this PR effectively implements is an alternative to:

// where f: Fn(Self::Item, Self::Item) -> Self::Item
iter.next().map(|a| iter.fold(a, f));

This seems like a useful method, since users trying to solve this problem might find themselves fussing around with multiple expressions to try thread that first value through, but it doesn't seem to complete any logical gaps in the current set of Iterator methods, so I'm a bit skeptical about introducing it. Is there an equivalent in itertools already?

@JohnCSimon
Copy link
Member

Ping from triage - can anyone answer the question from @KodrAus so this can be moved forward?
@cuviper @Centril @Lucretiel

@bluss
Copy link
Member

bluss commented Nov 11, 2019

Yes, fold1 in itertools is equivalent

@JohnCSimon
Copy link
Member

Ping from triage -
@KodrAus can you please address the build failure?
cc: @cuviper @Centril @Lucretiel

@JohnCSimon
Copy link
Member

Ping from triage -
@Lucretiel can you please address the build failure?

@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-02-10T00:12:44.2681795Z ========================== Starting Command Output ===========================
2020-02-10T00:12:44.2683696Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/92537232-cf7e-4168-9001-2725afbfc17f.sh
2020-02-10T00:12:44.2683739Z 
2020-02-10T00:12:44.2687128Z ##[section]Finishing: Disable git automatic line ending conversion
2020-02-10T00:12:44.2693023Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/65222/merge to s
2020-02-10T00:12:44.2694591Z Task         : Get sources
2020-02-10T00:12:44.2694620Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-10T00:12:44.2694647Z Version      : 1.0.0
2020-02-10T00:12:44.2694675Z Author       : Microsoft
---
2020-02-10T00:12:45.1116778Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-02-10T00:12:45.1240962Z ##[command]git config gc.auto 0
2020-02-10T00:12:45.1310799Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-02-10T00:12:45.1375398Z ##[command]git config --get-all http.proxy
2020-02-10T00:12:45.1522718Z ##[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/65222/merge:refs/remotes/pull/65222/merge
---
2020-02-10T01:09:57.6664424Z .................................................................................................... 1700/9621
2020-02-10T01:10:02.3934095Z .................................................................................................... 1800/9621
2020-02-10T01:10:14.6370420Z ............................i....................................................................... 1900/9621
2020-02-10T01:10:21.5661461Z .................................................................................................... 2000/9621
2020-02-10T01:10:35.3350121Z ..................iiiii............................................................................. 2100/9621
2020-02-10T01:10:44.4607882Z .................................................................................................... 2300/9621
2020-02-10T01:10:46.6561444Z .................................................................................................... 2400/9621
2020-02-10T01:10:51.2002723Z .................................................................................................... 2500/9621
2020-02-10T01:11:10.7208141Z .................................................................................................... 2600/9621
---
2020-02-10T01:13:47.2538222Z .....................................................................i...............i.............. 4900/9621
2020-02-10T01:13:54.6850705Z .................................................................................................... 5000/9621
2020-02-10T01:14:02.3083312Z .................................................................................................... 5100/9621
2020-02-10T01:14:06.9334015Z ...........i........................................................................................ 5200/9621
2020-02-10T01:14:17.6190564Z .....................................................................................ii.ii........i. 5300/9621
2020-02-10T01:14:21.3135643Z ..i................................................................................................. 5400/9621
2020-02-10T01:14:32.9691415Z .................................................................................................... 5600/9621
2020-02-10T01:14:40.9452194Z .........................................................................i.......................... 5700/9621
2020-02-10T01:14:47.9007378Z .................................................................................................... 5800/9621
2020-02-10T01:14:54.2024140Z .................................................................................................... 5900/9621
2020-02-10T01:14:54.2024140Z .................................................................................................... 5900/9621
2020-02-10T01:15:03.7484768Z .................................................................ii...i..ii...........i............. 6000/9621
2020-02-10T01:15:25.1742302Z .................................................................................................... 6200/9621
2020-02-10T01:15:32.8316641Z .................................................................................................... 6300/9621
2020-02-10T01:15:32.8316641Z .................................................................................................... 6300/9621
2020-02-10T01:15:40.2635665Z .............................................................................................i..ii.. 6400/9621
2020-02-10T01:16:02.3333772Z .................................................................................................... 6600/9621
2020-02-10T01:16:12.0782859Z ................................................................................i................... 6700/9621
2020-02-10T01:16:14.2435527Z .................................................................................................... 6800/9621
2020-02-10T01:16:16.5204150Z .......................................................................................i............ 6900/9621
---
2020-02-10T01:17:51.8738900Z .................................................................................................... 7600/9621
2020-02-10T01:17:56.1541974Z .................................................................................................... 7700/9621
2020-02-10T01:18:01.7158018Z .................................................................................................... 7800/9621
2020-02-10T01:18:10.1056444Z .................................................................................................... 7900/9621
2020-02-10T01:18:19.3335160Z ...............................................................iiiiiii.i............................ 8000/9621
2020-02-10T01:18:33.4848756Z ...i......i......................................................................................... 8200/9621
2020-02-10T01:18:38.7629500Z .................................................................................................... 8300/9621
2020-02-10T01:18:52.6496577Z .................................................................................................... 8400/9621
2020-02-10T01:19:00.9358734Z .................................................................................................... 8500/9621
---
2020-02-10T01:21:25.0696078Z  finished in 7.385
2020-02-10T01:21:25.0893602Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-10T01:21:25.2755973Z 
2020-02-10T01:21:25.2756283Z running 178 tests
2020-02-10T01:21:28.2493640Z iiii......i...........ii..iiii...i....i...........i............i..i..................i....i......... 100/178
2020-02-10T01:21:30.5307437Z ...i.i.i...iii..iiiiiiiiiiiiiiii.......................iii............ii......
2020-02-10T01:21:30.5311828Z 
2020-02-10T01:21:30.5317692Z  finished in 5.442
2020-02-10T01:21:30.5483947Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-10T01:21:30.7052111Z 
---
2020-02-10T01:21:32.6557330Z  finished in 2.107
2020-02-10T01:21:32.6742456Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-10T01:21:32.8272785Z 
2020-02-10T01:21:32.8273181Z running 9 tests
2020-02-10T01:21:32.8274176Z iiiiiiiii
2020-02-10T01:21:32.8274630Z 
2020-02-10T01:21:32.8274672Z  finished in 0.152
2020-02-10T01:21:32.8469170Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-10T01:21:33.0357609Z 
---
2020-02-10T01:21:53.7669638Z  finished in 20.920
2020-02-10T01:21:53.7897086Z Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-10T01:21:53.9705251Z 
2020-02-10T01:21:53.9705479Z running 116 tests
2020-02-10T01:22:07.3595427Z iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii..........i.....i..i.......ii.i.ii. 100/116
2020-02-10T01:22:09.2541570Z ....iiii.....ii.
2020-02-10T01:22:09.2542007Z 
2020-02-10T01:22:09.2546800Z  finished in 15.465
2020-02-10T01:22:09.2551756Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-10T01:22:09.2553372Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2020-02-10T01:35:20.5725841Z 
2020-02-10T01:35:20.5726448Z    Doc-tests core
2020-02-10T01:35:24.9917318Z 
2020-02-10T01:35:24.9918146Z running 2472 tests
2020-02-10T01:35:33.3798642Z ......iiiii......................................................................................... 100/2472
2020-02-10T01:35:41.7012085Z ..................................................................................ii................ 200/2472
2020-02-10T01:36:01.4891695Z .................i.................................................................................. 400/2472
2020-02-10T01:36:01.4891695Z .................i.................................................................................. 400/2472
2020-02-10T01:36:10.6198593Z ....F..................................................................i..i..................iiii... 500/2472
2020-02-10T01:36:27.1445877Z .................................................................................................... 700/2472
2020-02-10T01:36:35.6495432Z .................................................................................................... 800/2472
2020-02-10T01:36:43.8124611Z .................................................................................................... 900/2472
2020-02-10T01:36:52.2720170Z .................................................................................................... 1000/2472
---
2020-02-10T01:39:04.4871586Z    |
2020-02-10T01:39:04.4871699Z 18 | let b = [];
2020-02-10T01:39:04.4872350Z    |     -   ^^ cannot infer type
2020-02-10T01:39:04.4875426Z    |     |
2020-02-10T01:39:04.4875747Z    |     consider giving `b` the explicit type `[_; 0]`, with the type parameters specified
2020-02-10T01:39:04.4876598Z error[E0658]: use of unstable library feature 'iterator_fold_self'
2020-02-10T01:39:04.4876812Z   --> iter/traits/iterator.rs:2022:10
2020-02-10T01:39:04.4876916Z    |
2020-02-10T01:39:04.4876916Z    |
2020-02-10T01:39:04.4876955Z 10 |     iter.fold_first(|a, b| {
2020-02-10T01:39:04.4877266Z    |
2020-02-10T01:39:04.4877266Z    |
2020-02-10T01:39:04.4877644Z    = note: for more information, see ***/issues/68125
2020-02-10T01:39:04.4877697Z    = help: add `#![feature(iterator_fold_self)]` to the crate attributes to enable
2020-02-10T01:39:04.4877788Z error[E0308]: mismatched types
2020-02-10T01:39:04.4877989Z   --> iter/traits/iterator.rs:2023:21
2020-02-10T01:39:04.4878049Z    |
2020-02-10T01:39:04.4878049Z    |
2020-02-10T01:39:04.4878087Z 11 |         match a.cmp(b) {
2020-02-10T01:39:04.4878299Z    |
2020-02-10T01:39:04.4878299Z    |
2020-02-10T01:39:04.4878356Z    = note:    expected reference `&<I as std::iter::Iterator>::Item`
2020-02-10T01:39:04.4878401Z            found associated type `<I as std::iter::Iterator>::Item`
2020-02-10T01:39:04.4878453Z    = note: consider constraining the associated type `<I as std::iter::Iterator>::Item` to `&<I as std::iter::Iterator>::Item`
2020-02-10T01:39:04.4878812Z 
2020-02-10T01:39:04.4878851Z error: aborting due to 3 previous errors
2020-02-10T01:39:04.4878895Z 
2020-02-10T01:39:04.4878936Z Some errors have detailed explanations: E0282, E0308, E0658.
---
2020-02-10T01:39:04.5135852Z   local time: Mon Feb 10 01:39:04 UTC 2020
2020-02-10T01:39:04.8065629Z   network time: Mon, 10 Feb 2020 01:39:04 GMT
2020-02-10T01:39:04.8065784Z == end clock drift check ==
2020-02-10T01:39:05.1916465Z 
2020-02-10T01:39:05.1970341Z ##[error]Bash exited with code '1'.
2020-02-10T01:39:05.1986982Z ##[section]Finishing: Run build
2020-02-10T01:39:05.2006766Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/65222/merge to s
2020-02-10T01:39:05.2008459Z Task         : Get sources
2020-02-10T01:39:05.2008516Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-10T01:39:05.2008555Z Version      : 1.0.0
2020-02-10T01:39:05.2008590Z Author       : Microsoft
2020-02-10T01:39:05.2008590Z Author       : Microsoft
2020-02-10T01:39:05.2008645Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-02-10T01:39:05.2008688Z ==============================================================================
2020-02-10T01:39:05.6244098Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-02-10T01:39:05.6310480Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/65222/merge to s
2020-02-10T01:39:05.6756990Z Cleaning up task key
2020-02-10T01:39:05.6757829Z Start cleaning up orphan processes.
2020-02-10T01:39:05.6987948Z Terminate orphan process: pid (4005) (python)
2020-02-10T01:39:05.7296508Z ##[section]Finishing: Finalize Job

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

@Dylan-DPC-zz
Copy link

@Lucretiel any updates?

@joelpalmer
Copy link

Triaged

- Added `Iterator::fold_first`, which is like `fold`, but uses the first element in the iterator as the initial accumulator
- Includes doc and doctest
- Rebase commit; see rust-lang#65222 for details

Co-Authored-By: Tim Vermeulen <tvermeulen@me.com>
@Dylan-DPC-zz
Copy link

heck wtf

@Dylan-DPC-zz
Copy link

okay fixed the doctests and the git-weirdness now let's see what happens

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-tools 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-03-26T21:07:09.4668748Z ========================== Starting Command Output ===========================
2020-03-26T21:07:09.4672751Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/ef13d717-2820-4230-8716-a0b4d0a000f4.sh
2020-03-26T21:07:09.4673261Z 
2020-03-26T21:07:09.4679133Z ##[section]Finishing: Disable git automatic line ending conversion
2020-03-26T21:07:09.4700156Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/65222/merge to s
2020-03-26T21:07:09.4703715Z Task         : Get sources
2020-03-26T21:07:09.4704059Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-26T21:07:09.4704374Z Version      : 1.0.0
2020-03-26T21:07:09.4704658Z Author       : Microsoft
---
2020-03-26T21:07:10.6301865Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-03-26T21:07:10.6311914Z ##[command]git config gc.auto 0
2020-03-26T21:07:10.6317750Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-03-26T21:07:10.6325692Z ##[command]git config --get-all http.proxy
2020-03-26T21:07:10.6337598Z ##[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/65222/merge:refs/remotes/pull/65222/merge
---
2020-03-26T21:09:58.2627439Z extracting /checkout/obj/build/cache/2020-01-31/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.gz
2020-03-26T21:09:58.3886331Z error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
2020-03-26T21:09:58.3886690Z 
2020-03-26T21:09:58.3886849Z Caused by:
2020-03-26T21:09:58.3887937Z   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
2020-03-26T21:09:58.3898430Z Build completed unsuccessfully in 0:00:13
2020-03-26T21:09:58.3944555Z make: *** [prepare] Error 1
2020-03-26T21:09:58.3950813Z Makefile:67: recipe for target 'prepare' failed
2020-03-26T21:09:59.3961554Z Command failed. Attempt 2/5:
2020-03-26T21:09:59.3961554Z Command failed. Attempt 2/5:
2020-03-26T21:09:59.5579456Z error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
2020-03-26T21:09:59.5581669Z 
2020-03-26T21:09:59.5581837Z Caused by:
2020-03-26T21:09:59.5582982Z   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
2020-03-26T21:09:59.5597630Z Build completed unsuccessfully in 0:00:00
2020-03-26T21:09:59.5645177Z Makefile:67: recipe for target 'prepare' failed
2020-03-26T21:09:59.5648238Z make: *** [prepare] Error 1
2020-03-26T21:10:01.5670211Z Command failed. Attempt 3/5:
2020-03-26T21:10:01.5670211Z Command failed. Attempt 3/5:
2020-03-26T21:10:01.7269729Z error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
2020-03-26T21:10:01.7270091Z 
2020-03-26T21:10:01.7270231Z Caused by:
2020-03-26T21:10:01.7271198Z   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
2020-03-26T21:10:01.7284628Z Build completed unsuccessfully in 0:00:00
2020-03-26T21:10:01.7329414Z Makefile:67: recipe for target 'prepare' failed
2020-03-26T21:10:01.7334278Z make: *** [prepare] Error 1
2020-03-26T21:10:04.7358374Z Command failed. Attempt 4/5:
2020-03-26T21:10:04.7358374Z Command failed. Attempt 4/5:
2020-03-26T21:10:04.9038101Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2020-03-26T21:10:04.9038457Z 
2020-03-26T21:10:04.9038626Z Caused by:
2020-03-26T21:10:04.9039639Z   patch for `cargo` in `https://github.com/rust-lang/cargo` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
2020-03-26T21:10:04.9047751Z Build completed unsuccessfully in 0:00:00
2020-03-26T21:10:04.9096664Z make: *** [prepare] Error 1
2020-03-26T21:10:04.9097816Z Makefile:67: recipe for target 'prepare' failed
2020-03-26T21:10:08.9112262Z Command failed. Attempt 5/5:
2020-03-26T21:10:08.9112262Z Command failed. Attempt 5/5:
2020-03-26T21:10:09.0720417Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2020-03-26T21:10:09.0721305Z 
2020-03-26T21:10:09.0721948Z Caused by:
2020-03-26T21:10:09.0723486Z   patch for `cargo` in `https://github.com/rust-lang/cargo` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
2020-03-26T21:10:09.0738882Z Build completed unsuccessfully in 0:00:00
2020-03-26T21:10:09.0787719Z Makefile:67: recipe for target 'prepare' failed
2020-03-26T21:10:09.0788039Z make: *** [prepare] Error 1
2020-03-26T21:10:09.0788337Z The command has failed after 5 attempts.
2020-03-26T21:10:09.0788337Z The command has failed after 5 attempts.
2020-03-26T21:10:09.0788595Z == clock drift check ==
2020-03-26T21:10:09.0799157Z   local time: Thu Mar 26 21:10:09 UTC 2020
2020-03-26T21:10:09.2406266Z   network time: Thu, 26 Mar 2020 21:10:09 GMT
2020-03-26T21:10:09.2409503Z == end clock drift check ==
2020-03-26T21:10:16.9642890Z 
2020-03-26T21:10:16.9742122Z ##[error]Bash exited with code '1'.
2020-03-26T21:10:16.9756859Z ##[section]Finishing: Run build
2020-03-26T21:10:16.9800555Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/65222/merge to s
2020-03-26T21:10:16.9806385Z Task         : Get sources
2020-03-26T21:10:16.9806750Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-26T21:10:16.9807072Z Version      : 1.0.0
2020-03-26T21:10:16.9807296Z Author       : Microsoft
2020-03-26T21:10:16.9807296Z Author       : Microsoft
2020-03-26T21:10:16.9807662Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-03-26T21:10:16.9808184Z ==============================================================================
2020-03-26T21:10:17.3143951Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-03-26T21:10:17.3189180Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/65222/merge to s
2020-03-26T21:10:17.3280399Z Cleaning up task key
2020-03-26T21:10:17.3281530Z Start cleaning up orphan processes.
2020-03-26T21:10:17.3486522Z Terminate orphan process: pid (3587) (python)
2020-03-26T21:10:17.3606610Z ##[section]Finishing: Finalize Job

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

@Dylan-DPC-zz
Copy link

@bors try

@bors
Copy link
Contributor

bors commented Mar 26, 2020

⌛ Trying commit 36e17c78b69cfb657ce75b0c59a25cb3030711e7 with merge e1c4b614947b45173b0640bff464bf1f0135f477...

@bors
Copy link
Contributor

bors commented Mar 26, 2020

💔 Test failed - checks-azure

@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-03-26T22:19:34.9473774Z ========================== Starting Command Output ===========================
2020-03-26T22:19:34.9477070Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/a778ea8e-c520-4771-904b-e61def706c25.sh
2020-03-26T22:19:34.9477345Z 
2020-03-26T22:19:34.9481939Z ##[section]Finishing: Disable git automatic line ending conversion
2020-03-26T22:19:34.9500889Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/65222/merge to s
2020-03-26T22:19:34.9505033Z Task         : Get sources
2020-03-26T22:19:34.9505343Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-26T22:19:34.9505647Z Version      : 1.0.0
2020-03-26T22:19:34.9505854Z Author       : Microsoft
---
2020-03-26T22:19:35.9382983Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-03-26T22:19:35.9398515Z ##[command]git config gc.auto 0
2020-03-26T22:19:35.9403787Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-03-26T22:19:35.9408250Z ##[command]git config --get-all http.proxy
2020-03-26T22:19:35.9417200Z ##[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/65222/merge:refs/remotes/pull/65222/merge
---
2020-03-26T22:26:52.9209205Z    Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
2020-03-26T22:26:53.0568110Z    Compiling rustc_session v0.0.0 (/checkout/src/librustc_session)
2020-03-26T22:27:03.0504932Z    Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
2020-03-26T22:27:11.7894396Z    Compiling rustc_attr v0.0.0 (/checkout/src/librustc_attr)
2020-03-26T22:27:15.8869607Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-03-26T22:27:18.3188491Z    Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2020-03-26T22:27:51.6577335Z    Compiling rustc_ast_passes v0.0.0 (/checkout/src/librustc_ast_passes)
2020-03-26T22:28:00.0689479Z    Compiling rustc_expand v0.0.0 (/checkout/src/librustc_expand)
2020-03-26T22:28:49.2829059Z    Compiling rustc_builtin_macros v0.0.0 (/checkout/src/librustc_builtin_macros)
---
2020-03-26T22:48:47.5838253Z    Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
2020-03-26T22:48:59.9936849Z    Compiling rustc_session v0.0.0 (/checkout/src/librustc_session)
2020-03-26T22:49:08.6945384Z    Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
2020-03-26T22:49:22.8362965Z    Compiling rustc_attr v0.0.0 (/checkout/src/librustc_attr)
2020-03-26T22:49:27.2467669Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-03-26T22:49:28.8571757Z    Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2020-03-26T22:50:13.2087024Z    Compiling rustc_ast_passes v0.0.0 (/checkout/src/librustc_ast_passes)
2020-03-26T22:50:23.2139535Z    Compiling rustc_expand v0.0.0 (/checkout/src/librustc_expand)
2020-03-26T22:51:28.7754156Z    Compiling rustc_builtin_macros v0.0.0 (/checkout/src/librustc_builtin_macros)
---
2020-03-26T23:15:02.9037916Z .................................................................................................... 1700/9846
2020-03-26T23:15:07.1783896Z .................................................................................................... 1800/9846
2020-03-26T23:15:17.7760787Z .........................................................................................i.......... 1900/9846
2020-03-26T23:15:24.6595278Z .................................................................................................... 2000/9846
2020-03-26T23:15:31.1931293Z ...............................................................................iiiii................ 2100/9846
2020-03-26T23:15:52.6427619Z .................................................................................................... 2300/9846
2020-03-26T23:15:54.8960838Z .................................................................................................... 2400/9846
2020-03-26T23:15:57.4201021Z .................................................................................................... 2500/9846
2020-03-26T23:16:06.7371643Z .................................................................................................... 2600/9846
---
2020-03-26T23:18:57.1436845Z .....................................................i...............i.............................. 5000/9846
2020-03-26T23:19:05.2542751Z .................................................................................................... 5100/9846
2020-03-26T23:19:12.9383041Z ..................................................................................................i. 5200/9846
2020-03-26T23:19:18.0440687Z .................................................................................................... 5300/9846
2020-03-26T23:19:28.7128842Z .................................................................................i.iii........i...i. 5400/9846
2020-03-26T23:19:36.1362861Z .....................i.............................................................................. 5600/9846
2020-03-26T23:19:43.6339252Z ..........................i......................................................................... 5700/9846
2020-03-26T23:19:51.4796969Z ...........................................ii....................................i.................. 5800/9846
2020-03-26T23:19:58.9165351Z .................................................................................................... 5900/9846
2020-03-26T23:19:58.9165351Z .................................................................................................... 5900/9846
2020-03-26T23:20:04.2820064Z .................................................................................................... 6000/9846
2020-03-26T23:20:13.6139416Z ...........................................................................ii...i..ii...........i... 6100/9846
2020-03-26T23:20:33.8337735Z .................................................................................................... 6300/9846
2020-03-26T23:20:39.2153381Z .................................................................................................... 6400/9846
2020-03-26T23:20:42.8073839Z .................................................................................................... 6500/9846
2020-03-26T23:20:42.8073839Z .................................................................................................... 6500/9846
2020-03-26T23:20:54.8263765Z .....i..ii.......................................................................................... 6600/9846
2020-03-26T23:21:14.6602094Z .................................................................................................... 6800/9846
2020-03-26T23:21:16.8522002Z ....i............................................................................................... 6900/9846
2020-03-26T23:21:19.0230048Z .................................................................................................... 7000/9846
2020-03-26T23:21:21.3891039Z ........................................i........................................................... 7100/9846
---
2020-03-26T23:23:01.3143367Z .................................................................................................... 7800/9846
2020-03-26T23:23:06.0247334Z .................................................................................................... 7900/9846
2020-03-26T23:23:12.9777679Z .................................................................................................i.. 8000/9846
2020-03-26T23:23:20.5949970Z .................................................................................................... 8100/9846
2020-03-26T23:23:28.1564449Z ..............................................iiiiiiiiii.i.......................................... 8200/9846
2020-03-26T23:23:37.7523683Z ..........................................................................................i......i.. 8300/9846
2020-03-26T23:23:47.3670930Z .................................................................................................... 8500/9846
2020-03-26T23:24:00.5651919Z .................................................................................................... 8600/9846
2020-03-26T23:24:09.5682722Z .................................................................................................... 8700/9846
2020-03-26T23:24:15.1266900Z .................................................................................................... 8800/9846
---
2020-03-26T23:26:27.4904687Z Suite("src/test/codegen") not skipped for "bootstrap::test::Codegen" -- not in ["src/tools/tidy"]
2020-03-26T23:26:27.5111708Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-26T23:26:27.7266318Z 
2020-03-26T23:26:27.7266750Z running 183 tests
2020-03-26T23:26:30.4400347Z iiii......i............ii.i..iiii....i....i...........i............i..i..................i....i..... 100/183
2020-03-26T23:26:32.9679204Z .......i.i.i...iii..iiiiiiiiiiiiiiii.......................iii.............ii......
2020-03-26T23:26:32.9685916Z 
2020-03-26T23:26:32.9692338Z  finished in 5.458
2020-03-26T23:26:32.9700103Z Suite("src/test/codegen-units") not skipped for "bootstrap::test::CodegenUnits" -- not in ["src/tools/tidy"]
2020-03-26T23:26:32.9898412Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-03-26T23:26:35.0736985Z Suite("src/test/assembly") not skipped for "bootstrap::test::Assembly" -- not in ["src/tools/tidy"]
2020-03-26T23:26:35.0929880Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-26T23:26:35.2488686Z 
2020-03-26T23:26:35.2489639Z running 9 tests
2020-03-26T23:26:35.2492797Z iiiiiiiii
2020-03-26T23:26:35.2493849Z 
2020-03-26T23:26:35.2498627Z  finished in 0.156
2020-03-26T23:26:35.2501083Z Suite("src/test/incremental") not skipped for "bootstrap::test::Incremental" -- not in ["src/tools/tidy"]
2020-03-26T23:26:35.2694288Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-03-26T23:26:55.3192386Z Suite("src/test/debuginfo") not skipped for "bootstrap::test::Debuginfo" -- not in ["src/tools/tidy"]
2020-03-26T23:26:55.3448577Z Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-26T23:26:55.5274219Z 
2020-03-26T23:26:55.5274623Z running 115 tests
2020-03-26T23:27:08.5757210Z iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii.........i.....i..i.......ii.i.ii.. 100/115
2020-03-26T23:27:10.3391066Z ...iiii.....ii.
2020-03-26T23:27:10.3392276Z 
2020-03-26T23:27:10.3397281Z  finished in 14.995
2020-03-26T23:27:10.3405484Z Suite("src/test/ui-fulldeps") not skipped for "bootstrap::test::UiFullDeps" -- not in ["src/tools/tidy"]
2020-03-26T23:27:10.3406226Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-03-26T23:39:17.6566813Z 
2020-03-26T23:39:17.6570017Z    Doc-tests core
2020-03-26T23:39:22.1574951Z 
2020-03-26T23:39:22.1579984Z running 2487 tests
2020-03-26T23:39:31.1358249Z ......iiiii......................................................................................... 100/2487
2020-03-26T23:39:39.9535839Z .....................................................................................ii............. 200/2487
2020-03-26T23:40:00.3146920Z ....................i............................................................................... 400/2487
2020-03-26T23:40:00.3146920Z ....................i............................................................................... 400/2487
2020-03-26T23:40:09.9734146Z ......F...................................................................i..i..................iiii 500/2487
2020-03-26T23:40:26.2956166Z .................................................................................................... 700/2487
2020-03-26T23:40:35.1243205Z .................................................................................................... 800/2487
2020-03-26T23:40:43.9705628Z .................................................................................................... 900/2487
2020-03-26T23:40:52.8397508Z .................................................................................................... 1000/2487
---
2020-03-26T23:43:05.6811469Z ---- iter/traits/iterator.rs - iter::traits::iterator::Iterator::fold_first (line 2017) stdout ----
2020-03-26T23:43:05.6811854Z error[E0308]: mismatched types
2020-03-26T23:43:05.6812568Z   --> iter/traits/iterator.rs:2026:23
2020-03-26T23:43:05.6816895Z    |
2020-03-26T23:43:05.6817524Z 12 |         a.partial_cmp(b).map(move |cmp| match cmp {
2020-03-26T23:43:05.6818370Z    |                       |
2020-03-26T23:43:05.6818856Z    |                       expected reference, found associated type
2020-03-26T23:43:05.6819429Z    |                       help: consider borrowing here: `&b`
2020-03-26T23:43:05.6819880Z    |
2020-03-26T23:43:05.6819880Z    |
2020-03-26T23:43:05.6820343Z    = note:    expected reference `&<I as std::iter::Iterator>::Item`
2020-03-26T23:43:05.6820963Z            found associated type `<I as std::iter::Iterator>::Item`
2020-03-26T23:43:05.6821767Z    = note: consider constraining the associated type `<I as std::iter::Iterator>::Item` to `&<I as std::iter::Iterator>::Item`
2020-03-26T23:43:05.6823763Z 
2020-03-26T23:43:05.6824109Z error[E0308]: mismatched types
2020-03-26T23:43:05.6824799Z   --> iter/traits/iterator.rs:2026:9
2020-03-26T23:43:05.6825210Z    |
2020-03-26T23:43:05.6825210Z    |
2020-03-26T23:43:05.6825606Z 12 | /         a.partial_cmp(b).map(move |cmp| match cmp {
2020-03-26T23:43:05.6826152Z 13 | |             Ordering::Greater | Ordering::Equal => a,
2020-03-26T23:43:05.6826694Z 14 | |             Ordering::Less => b,
2020-03-26T23:43:05.6827593Z    | |__________^ expected associated type, found enum `std::option::Option`
2020-03-26T23:43:05.6828077Z    |
2020-03-26T23:43:05.6828532Z    = note: expected associated type `<I as std::iter::Iterator>::Item`
2020-03-26T23:43:05.6829483Z                          found enum `std::option::Option<<I as std::iter::Iterator>::Item>`
2020-03-26T23:43:05.6829483Z                          found enum `std::option::Option<<I as std::iter::Iterator>::Item>`
2020-03-26T23:43:05.6830552Z    = note: consider constraining the associated type `<I as std::iter::Iterator>::Item` to `std::option::Option<<I as std::iter::Iterator>::Item>` or calling a method that returns `<I as std::iter::Iterator>::Item`
2020-03-26T23:43:05.6832581Z 
2020-03-26T23:43:05.6832946Z error: aborting due to 2 previous errors
2020-03-26T23:43:05.6833277Z 
2020-03-26T23:43:05.6833985Z For more information about this error, try `rustc --explain E0308`.
---
2020-03-26T23:43:05.6974541Z   local time: Thu Mar 26 23:43:05 UTC 2020
2020-03-26T23:43:05.8675832Z   network time: Thu, 26 Mar 2020 23:43:05 GMT
2020-03-26T23:43:05.8676223Z == end clock drift check ==
2020-03-26T23:43:06.3085723Z 
2020-03-26T23:43:06.3129069Z ##[error]Bash exited with code '1'.
2020-03-26T23:43:06.3154168Z ##[section]Finishing: Run build
2020-03-26T23:43:06.3231247Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/65222/merge to s
2020-03-26T23:43:06.3236564Z Task         : Get sources
2020-03-26T23:43:06.3236932Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-26T23:43:06.3237253Z Version      : 1.0.0
2020-03-26T23:43:06.3237500Z Author       : Microsoft
2020-03-26T23:43:06.3237500Z Author       : Microsoft
2020-03-26T23:43:06.3237865Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-03-26T23:43:06.3238284Z ==============================================================================
2020-03-26T23:43:06.6817354Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-03-26T23:43:06.6871245Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/65222/merge to s
2020-03-26T23:43:06.6960314Z Cleaning up task key
2020-03-26T23:43:06.6961661Z Start cleaning up orphan processes.
2020-03-26T23:43:06.7142713Z Terminate orphan process: pid (4189) (python)
2020-03-26T23:43:06.7364067Z ##[section]Finishing: Finalize Job

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

@Dylan-DPC-zz
Copy link

@bors r=kodrAus rollup

@bors
Copy link
Contributor

bors commented Mar 27, 2020

📌 Commit 268408f has been approved by kodrAus

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 27, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 27, 2020
Rollup of 4 pull requests

Successful merges:

 - rust-lang#65222 (Proposal: `fold_self` and `try_fold_self` for Iterators)
 - rust-lang#69887 (clean up E0404 explanation)
 - rust-lang#70068 (use "gcc" instead of "cc" on *-sun-solaris systems when linking)
 - rust-lang#70470 (Clean up E0463 explanation)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented Mar 27, 2020

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

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 27, 2020
@bors bors merged commit 87fdf35 into rust-lang:master Mar 27, 2020
@Lucretiel
Copy link
Contributor Author

Wait, should this have been merged? I thought there were still outstanding issues that needed resolving

@Dylan-DPC-zz
Copy link

@Lucretiel the only issue was regarding the doc tests which was fixed. Anything else?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.