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

Rollup of 14 pull requests #63309

Closed
wants to merge 46 commits into from
Closed

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Aug 5, 2019

Successful merges:

Failed merges:

r? @ghost

timvermeulen and others added 30 commits July 9, 2019 23:38
…dation step

Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
…ebank"

This reverts commit df21a6f, reversing
changes made to cc16d04.
Co-Authored-By: Aleksey Kladov <aleksey.kladov@gmail.com>
Co-Authored-By: Aleksey Kladov <aleksey.kladov@gmail.com>
This is just needless indirection.
RalfJung and others added 16 commits August 5, 2019 18:38
…scottmcm

Implement DoubleEndedIterator for iter::{StepBy, Peekable, Take}

Now that `DoubleEndedIterator::nth_back` has landed, `StepBy` and `Take` can have an efficient `DoubleEndedIterator` implementation. I don't know if there was any particular reason for `Peekable` not having a `DoubleEndedIterator` implementation, but it's quite trivial and I don't see any drawbacks to having it.

I'm not very happy about the implementation of `Peekable::try_rfold`, but I didn't see another way to only take the value out of `self.peeked` in case `self.iter.try_rfold` didn't exit early.

I only added `Peekable::rfold` (in addition to `try_rfold`) because its `Iterator` implementation has both `fold` and `try_fold` (and for similar reasons I added `Take::try_rfold` but not `Take::rfold`). Do we have any guidelines on whether we want both? If we do want both, maybe we should investigate which iterator adaptors override `try_fold` but not `fold` and add the missing implementations. At the moment I think that it's better to always have iterator adaptors implement both, because some iterators have a simpler `fold` implementation than their `try_fold` implementation.

The tests that I added may not be sufficient because they're all just existing tests where `next`/`nth`/`fold`/`try_fold` are replaced by their DEI counterparts, but I do think all paths are covered. Is there anything in particular that I should probably also test?
…omasdezeeuw

Add {IoSlice, IoSliceMut}::advance

API inspired by the [`Buf::advance`](https://docs.rs/bytes/0.4.12/bytes/trait.Buf.html#tymethod.advance) method found in the [bytes](https://docs.rs/bytes) crate.

Closes rust-lang#62726.
Remove special code-path for handing unknown tokens

In `StringReader`, we have a buffer of fatal errors, which is used only in a single case: when we see something which is not a reasonable token at all, like `🦀`. I think a more straightforward thing to do here is to produce an explicit error token in this case, and let the next layer (the parser), deal with it.

However currently this leads to duplicated error messages. What should we do with this? Naively, I would think that emitting (just emitting, not raising) `FatalError` should stop other errors, but looks like this is not the case? We can also probably tweak parser on the case-by-case basis, to avoid emitting "expected" errors if the current token is an `Err`. I personally also fine with cascading errors in this case: it's quite unlikely that you actually type a fully invalid token.

@petrochenkov, which approach should we take to fight cascading errors?
Always error on `SizeOverflow` during mir evaluation

Fix rust-lang#55878, fix rust-lang#25116.

r? @oli-obk
Explaining the reason why validation is performed in to_str of path.rs

I thought it's good to explain the reason for the validation during the conversion between Path/PathBuffer into str, which explains the reason for returning an Option at this point (good for beginners who are reading through the docs).
diagnostics: Describe crate root modules in `DefKind::Mod` as "crate"

Or we can use "extern crate" like resolve previously did sometimes, not sure.

r? @davidtwco
fix UB in a test

We used to compare two mutable references that were supposed to point to the same thing. That's no good.

Compare them as raw pointers instead.
…rors, r=estebank

Revert "Rollup merge of rust-lang#62696 - chocol4te:fix_#62194, r=estebank"

This reverts commit df21a6f (rust-lang#62696), reversing
changes made to cc16d04.

That PR makes error messages worse than before, and we couldn't come up with a way of actually making them better, so revert it for now. Any idea for making this error message better is welcome!

Fixes rust-lang#63145.

r? @estebank
…chenkov

Some more libsyntax::attr cleanup

Much smaller patch than the last one, mostly just finishing up by removing some Span arguments.

r? @petrochenkov
…Centril

Remove leftover AwaitOrigin

This was missed in PR rust-lang#62293.
Don't store &Span

This is just needless indirection.
…=oli-obk

Make qualify consts in_projection use PlaceRef

r? @oli-obk
@Centril
Copy link
Contributor Author

Centril commented Aug 5, 2019

@bors r+ p=14 rollup=never

@bors
Copy link
Contributor

bors commented Aug 5, 2019

📌 Commit 619ed36 has been approved by Centril

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 5, 2019
@bors
Copy link
Contributor

bors commented Aug 5, 2019

⌛ Testing commit 619ed36 with merge ae25bf6d7b6470f4f5379ac7327999d1b7133126...

@bors
Copy link
Contributor

bors commented Aug 6, 2019

💔 Test failed - checks-azure

@rust-highfive
Copy link
Collaborator

The job i686-apple of your PR failed (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-08-06T00:16:29.8445180Z 
2019-08-06T00:16:29.8445840Z ---- [ui] ui/huge-array-simple-64.rs stdout ----
2019-08-06T00:16:29.8445960Z diff of stderr:
2019-08-06T00:16:29.8446010Z 
2019-08-06T00:16:29.8446110Z 1 error: the type `[u8; 2147516416]` is too big for the current architecture
2019-08-06T00:16:29.8447170Z -   --> $DIR/huge-array-simple-32.rs:9:9
2019-08-06T00:16:29.8447810Z +   --> $DIR/huge-array-simple-64.rs:9:9
2019-08-06T00:16:29.8447920Z 3    |
2019-08-06T00:16:29.8448020Z 4 LL |     let _fat: [u8; (1<<31)+(1<<15)] =
2019-08-06T00:16:29.8448150Z 
2019-08-06T00:16:29.8448200Z 
2019-08-06T00:16:29.8448280Z The actual stderr differed from the expected stderr.
2019-08-06T00:16:29.8448280Z The actual stderr differed from the expected stderr.
2019-08-06T00:16:29.8449060Z Actual stderr saved to /Users/vsts/agent/2.155.1/work/1/s/build/i686-apple-darwin/test/ui/huge-array-simple-64/huge-array-simple-64.stderr
2019-08-06T00:16:29.8449760Z To update references, rerun the tests and pass the `--bless` flag
2019-08-06T00:16:29.8450500Z To only update this specific test, also pass `--test-args huge-array-simple-64.rs`
2019-08-06T00:16:29.8450680Z error: 1 errors occurred comparing output.
2019-08-06T00:16:29.8450760Z status: exit code: 1
2019-08-06T00:16:29.8450760Z status: exit code: 1
2019-08-06T00:16:29.8452380Z command: "/Users/vsts/agent/2.155.1/work/1/s/build/i686-apple-darwin/stage2/bin/rustc" "/Users/vsts/agent/2.155.1/work/1/s/src/test/ui/huge-array-simple-64.rs" "-Zthreads=1" "--target=i686-apple-darwin" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/Users/vsts/agent/2.155.1/work/1/s/build/i686-apple-darwin/test/ui/huge-array-simple-64" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/Users/vsts/agent/2.155.1/work/1/s/build/i686-apple-darwin/native/rust-test-helpers" "-L" "/Users/vsts/agent/2.155.1/work/1/s/build/i686-apple-darwin/test/ui/huge-array-simple-64/auxiliary" "-A" "unused"
2019-08-06T00:16:29.8453430Z ------------------------------------------
2019-08-06T00:16:29.8453520Z 
2019-08-06T00:16:29.8454130Z ------------------------------------------
2019-08-06T00:16:29.8454260Z stderr:
2019-08-06T00:16:29.8454260Z stderr:
2019-08-06T00:16:29.8454840Z ------------------------------------------
2019-08-06T00:16:29.8454980Z error: the type `[u8; 2147516416]` is too big for the current architecture
2019-08-06T00:16:29.8455670Z   --> /Users/vsts/agent/2.155.1/work/1/s/src/test/ui/huge-array-simple-64.rs:9:9
2019-08-06T00:16:29.8456650Z    |
2019-08-06T00:16:29.8456770Z LL |     let _fat: [u8; (1<<31)+(1<<15)] = //~ ERROR too big for the current architecture
2019-08-06T00:16:29.8457050Z 
2019-08-06T00:16:29.8457180Z error: aborting due to previous error
2019-08-06T00:16:29.8457260Z 
2019-08-06T00:16:29.8457450Z 
2019-08-06T00:16:29.8457450Z 
2019-08-06T00:16:29.8458190Z ------------------------------------------
2019-08-06T00:16:29.8458560Z 
2019-08-06T00:16:29.8458710Z 
2019-08-06T00:16:29.8459430Z ---- [ui] ui/issues/issue-15919-32.rs stdout ----
2019-08-06T00:16:29.8459870Z diff of stderr:
2019-08-06T00:16:29.8459980Z 
2019-08-06T00:16:29.8460130Z 1 error: the type `[usize; 4294967295]` is too big for the current architecture
2019-08-06T00:16:29.8460850Z -   --> $DIR/issue-15919-64.rs:8:9
2019-08-06T00:16:29.8461820Z +   --> $DIR/issue-15919-32.rs:8:9
2019-08-06T00:16:29.8462250Z 3    |
2019-08-06T00:16:29.8462420Z 4 LL |     let x = [0usize; 0xffff_ffff];
2019-08-06T00:16:29.8462630Z 
2019-08-06T00:16:29.8462700Z 
2019-08-06T00:16:29.8462850Z The actual stderr differed from the expected stderr.
2019-08-06T00:16:29.8463720Z Actual stderr saved to /Users/vsts/agent/2.155.1/work/1/s/build/i686-apple-darwin/test/ui/issues/issue-15919-32/issue-15919-32.stderr
2019-08-06T00:16:29.8463720Z Actual stderr saved to /Users/vsts/agent/2.155.1/work/1/s/build/i686-apple-darwin/test/ui/issues/issue-15919-32/issue-15919-32.stderr
2019-08-06T00:16:29.8464820Z To update references, rerun the tests and pass the `--bless` flag
2019-08-06T00:16:29.8465890Z To only update this specific test, also pass `--test-args issues/issue-15919-32.rs`
2019-08-06T00:16:29.8466450Z error: 1 errors occurred comparing output.
2019-08-06T00:16:29.8466560Z status: exit code: 1
2019-08-06T00:16:29.8466560Z status: exit code: 1
2019-08-06T00:16:29.8468080Z command: "/Users/vsts/agent/2.155.1/work/1/s/build/i686-apple-darwin/stage2/bin/rustc" "/Users/vsts/agent/2.155.1/work/1/s/src/test/ui/issues/issue-15919-32.rs" "-Zthreads=1" "--target=i686-apple-darwin" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/Users/vsts/agent/2.155.1/work/1/s/build/i686-apple-darwin/test/ui/issues/issue-15919-32" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/Users/vsts/agent/2.155.1/work/1/s/build/i686-apple-darwin/native/rust-test-helpers" "-L" "/Users/vsts/agent/2.155.1/work/1/s/build/i686-apple-darwin/test/ui/issues/issue-15919-32/auxiliary" "-A" "unused"
2019-08-06T00:16:29.8469740Z ------------------------------------------
2019-08-06T00:16:29.8470120Z 
2019-08-06T00:16:29.8470900Z ------------------------------------------
2019-08-06T00:16:29.8471330Z stderr:
2019-08-06T00:16:29.8471330Z stderr:
2019-08-06T00:16:29.8472050Z ------------------------------------------
2019-08-06T00:16:29.8472500Z error: the type `[usize; 4294967295]` is too big for the current architecture
2019-08-06T00:16:29.8473320Z   --> /Users/vsts/agent/2.155.1/work/1/s/src/test/ui/issues/issue-15919-32.rs:8:9
2019-08-06T00:16:29.8473740Z    |
2019-08-06T00:16:29.8473930Z LL |     let x = [0usize; 0xffff_ffff]; //~ ERROR too big
2019-08-06T00:16:29.8474140Z 
2019-08-06T00:16:29.8474470Z error: aborting due to previous error
2019-08-06T00:16:29.8474980Z 
2019-08-06T00:16:29.8475100Z 
---
2019-08-06T00:16:29.8528710Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:536:22
2019-08-06T00:16:29.8528900Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-08-06T00:16:29.8544340Z 
2019-08-06T00:16:29.8544890Z 
2019-08-06T00:16:29.8548500Z command did not execute successfully: "/Users/vsts/agent/2.155.1/work/1/s/build/i686-apple-darwin/stage0-tools-bin/compiletest" "--compile-lib-path" "/Users/vsts/agent/2.155.1/work/1/s/build/i686-apple-darwin/stage2/lib" "--run-lib-path" "/Users/vsts/agent/2.155.1/work/1/s/build/i686-apple-darwin/stage2/lib/rustlib/i686-apple-darwin/lib" "--rustc-path" "/Users/vsts/agent/2.155.1/work/1/s/build/i686-apple-darwin/stage2/bin/rustc" "--src-base" "/Users/vsts/agent/2.155.1/work/1/s/src/test/ui" "--build-base" "/Users/vsts/agent/2.155.1/work/1/s/build/i686-apple-darwin/test/ui" "--stage-id" "stage2-i686-apple-darwin" "--mode" "ui" "--target" "i686-apple-darwin" "--host" "i686-apple-darwin" "--llvm-filecheck" "/Users/vsts/agent/2.155.1/work/1/s/build/i686-apple-darwin/llvm/build/bin/FileCheck" "--nodejs" "/usr/local/bin/node" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/Users/vsts/agent/2.155.1/work/1/s/build/i686-apple-darwin/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/Users/vsts/agent/2.155.1/work/1/s/build/i686-apple-darwin/native/rust-test-helpers" "--docck-python" "/usr/local/bin/python2.7" "--lldb-python" "/usr/bin/python" "--lldb-version" "lldb-902.0.79.2\n  Swift-4.1\n" "--lldb-python-dir" "/Applications/Xcode_9.3.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python" "--llvm-version" "9.0.0-rust-1.38.0-dev\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2019-08-06T00:16:29.8550330Z 
2019-08-06T00:16:29.8550450Z 
2019-08-06T00:16:29.8561230Z failed to run: /Users/vsts/agent/2.155.1/work/1/s/build/bootstrap/debug/bootstrap test
2019-08-06T00:16:29.8561410Z Build completed unsuccessfully in 1:06:46
2019-08-06T00:16:29.8561410Z Build completed unsuccessfully in 1:06:46
2019-08-06T00:16:29.8809060Z ##[error]Bash exited with code '1'.
2019-08-06T00:16:29.8856920Z ##[section]Starting: Upload CPU usage statistics
2019-08-06T00:16:29.8861910Z ==============================================================================
2019-08-06T00:16:29.8862020Z Task         : Bash
2019-08-06T00:16:29.8862110Z Description  : Run a Bash script on macOS, Linux, or Windows

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)

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 6, 2019
@Centril Centril closed this Aug 6, 2019
@Centril Centril deleted the rollup-j4c1aqi branch August 6, 2019 02:07
@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup 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.