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 10 pull requests #69909

Closed
wants to merge 38 commits into from
Closed

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Mar 11, 2020

Successful merges:

Failed merges:

r? @ghost

tspiteri and others added 30 commits February 22, 2020 14:03
All of these functions can be implemented simply and naturally as
const functions, e.g. u32::from_le_bytes can be implemented as

    (bytes[0] as u32)
        | (bytes[1] as u32) << 8
        | (bytes[2] as u32) << 16
        | (bytes[3] as u32) << 24

So stabilizing the constness will not expose that internally they are
implemented using transmute which is not const in stable.
Small composite types like `Point { x: i32, y: i32}` are plain
old data and we should encourage users to derive `Copy` on them.

This changes the semantics of the edited examples slightly: instead
of consuming the operands during addition, it will copy them. This
is desired behaviour.

Co-Authored-By: Jake Goulding <shepmaster@mac.com>
Move anon-params tests to ui/anon-params.
mem::zeroed/uninit: panic on types that do not permit zero-initialization

r? @eddyb @oli-obk

Cc rust-lang#62825

Also see [this summary comment](rust-lang#66059 (comment))
…i-obk

Stabilize const for integer {to,from}_{be,le,ne}_bytes methods

All of these functions can be implemented simply and naturally as const functions, e.g. `u32::from_le_bytes` can be implemented as
```rust
(bytes[0] as u32)
    | (bytes[1] as u32) << 8
    | (bytes[2] as u32) << 16
    | (bytes[3] as u32) << 24
```
So stabilizing the constness will not expose that internally they are implemented using transmute which is not const in stable.
…, r=nikomatsakis

Use TypeRelating for instantiating query responses

`eq` can add constraints to `RegionConstraintData`, which isn't allowed during borrow checking outside of a `CustomTypeOp`. Use `TypeRelating` instead to always push constraints to the obligations list.

closes rust-lang#69490
…ntation, r=shepmaster

Make Point `Copy` in arithmetic documentation

Small composite types like `Point { x: i32, y: i32}` are plain
old data and we should encourage users to derive `Copy` on them.

This changes the semantics of the edited examples slightly: instead
of consuming the operands during addition, it will copy them. This
is desired behaviour.
make `mem::discriminant` const

implements rust-lang#69821, which could be used as a tracking issue for `const_discriminant`.

Should this be added to the meta tracking issue rust-lang#57563?
@Lokathor
VariantSizeDifferences: bail on SizeOverflow

Fixes rust-lang#69485.

r? @oli-obk
Exhaustiveness checking, `Matrix::push`: recursively expand or-patterns

> There's an implicit invariant that there should be no or-patterns directly in the first column of the matrix, but this invariant is broken exactly when an or-pattern has a child that is itself an or-pattern.

Here we preserve this broken invariant by recursively expanding `PatKind::Or`s in `Matrix::push`.
Fixes rust-lang#69875.

r? @varkor
cc @Nadrieril
cc rust-lang#54883
parse: Tweak the function parameter edition check

Follow-up to rust-lang#69801.

Edition of a code fragment is inferred from "the place where the code is written".
For individual tokens like edition-specific keywords it may be the span of the token itself ("uninterpolated" span), but for larger code fragments it's probably not, in the test example the trait method is obviously written in "2015 edition code".

r? @Centril
@Centril
Copy link
Contributor Author

Centril commented Mar 11, 2020

@bors r+ p=10 rollup=never

@bors
Copy link
Contributor

bors commented Mar 11, 2020

📌 Commit 4e34e15 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 Mar 11, 2020
@Centril Centril added the rollup A PR which is a rollup label Mar 11, 2020
@bors
Copy link
Contributor

bors commented Mar 11, 2020

⌛ Testing commit 4e34e15 with merge ea07e5f54144624e314c3d8b8c2e5721aa63ccbf...

@rust-highfive
Copy link
Collaborator

The job test-various 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-11T09:12:14.7843190Z test [ui] ui/allocator/xcrate-use.rs ... ok
2020-03-11T09:12:14.8160375Z test [ui] ui/annotate-snippet/missing-type.rs ... ok
2020-03-11T09:12:14.8466465Z test [ui] ui/anon-params/anon-params-denied-2018.rs ... ok
2020-03-11T09:12:14.9261073Z test [ui] ui/allocator/xcrate-use2.rs ... ok
2020-03-11T09:12:15.0000888Z test [ui] ui/anon-params/anon-params-edition-hygiene.rs ... ok
2020-03-11T09:12:15.0056492Z test [ui] ui/anon-params/anon-params-deprecated.rs ... ok
2020-03-11T09:12:15.0409847Z test [ui] ui/anonymous-higher-ranked-lifetime.rs ... ok
2020-03-11T09:12:15.0753610Z test [ui] ui/arg-type-mismatch.rs ... ok
2020-03-11T09:12:15.1591550Z test [ui] ui/array-break-length.rs ... ok
2020-03-11T09:12:15.2331006Z test [ui] ui/array-not-vector.rs ... ok
---
2020-03-11T09:22:47.0035874Z 
2020-03-11T09:22:47.0036815Z ---- [ui] ui/lint/issue-69485-var-size-diffs-too-large.rs stdout ----
2020-03-11T09:22:47.0037334Z diff of stderr:
2020-03-11T09:22:47.0037608Z 
2020-03-11T09:22:47.0038293Z - error: the type `[u8; 18446744073709551615]` is too big for the current architecture
2020-03-11T09:22:47.0038866Z + error: the type `[u8; 4294967295]` is too big for the current architecture
2020-03-11T09:22:47.0039588Z 2   --> $DIR/issue-69485-var-size-diffs-too-large.rs:4:12
2020-03-11T09:22:47.0040037Z 3    |
2020-03-11T09:22:47.0040381Z 4 LL |     Bug::V([0; !0]);
2020-03-11T09:22:47.0040940Z 
2020-03-11T09:22:47.0041299Z The actual stderr differed from the expected stderr.
2020-03-11T09:22:47.0041299Z The actual stderr differed from the expected stderr.
2020-03-11T09:22:47.0042165Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/lint/issue-69485-var-size-diffs-too-large/issue-69485-var-size-diffs-too-large.stderr
2020-03-11T09:22:47.0043041Z To update references, rerun the tests and pass the `--bless` flag
2020-03-11T09:22:47.0044158Z To only update this specific test, also pass `--test-args lint/issue-69485-var-size-diffs-too-large.rs`
2020-03-11T09:22:47.0045547Z error: 1 errors occurred comparing output.
2020-03-11T09:22:47.0046204Z status: exit code: 1
2020-03-11T09:22:47.0046204Z status: exit code: 1
2020-03-11T09:22:47.0048355Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/lint/issue-69485-var-size-diffs-too-large.rs" "-Zthreads=1" "--target=wasm32-unknown-unknown" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/lint/issue-69485-var-size-diffs-too-large" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/wasm32-unknown-unknown/native/rust-test-helpers" "-A" "unused" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/lint/issue-69485-var-size-diffs-too-large/auxiliary"
2020-03-11T09:22:47.0050767Z ------------------------------------------
2020-03-11T09:22:47.0051416Z 
2020-03-11T09:22:47.0052233Z ------------------------------------------
2020-03-11T09:22:47.0052894Z stderr:
2020-03-11T09:22:47.0052894Z stderr:
2020-03-11T09:22:47.0054063Z ------------------------------------------
2020-03-11T09:22:47.0055025Z error: the type `[u8; 4294967295]` is too big for the current architecture
2020-03-11T09:22:47.0056152Z   --> /checkout/src/test/ui/lint/issue-69485-var-size-diffs-too-large.rs:4:12
2020-03-11T09:22:47.0056986Z    |
2020-03-11T09:22:47.0059289Z LL |     Bug::V([0; !0]); //~ ERROR is too big for the current
2020-03-11T09:22:47.0060989Z 
2020-03-11T09:22:47.0061832Z error: aborting due to previous error
2020-03-11T09:22:47.0062514Z 
2020-03-11T09:22:47.0063046Z 
---
2020-03-11T09:22:47.0160669Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
2020-03-11T09:22:47.0161103Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-03-11T09:22:47.0161325Z 
2020-03-11T09:22:47.0161415Z 
2020-03-11T09:22:47.0165301Z 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/wasm32-unknown-unknown/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-wasm32-unknown-unknown" "--mode" "ui" "--target" "wasm32-unknown-unknown" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--nodejs" "/node-v9.2.0-linux-x64/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/wasm32-unknown-unknown/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--llvm-version" "9.0.1-rust-1.43.0-nightly\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-03-11T09:22:47.0170773Z 
2020-03-11T09:22:47.0170870Z 
2020-03-11T09:22:47.0171717Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --target wasm32-unknown-unknown src/test/run-make src/test/ui src/test/compile-fail src/test/mir-opt src/test/codegen-units src/libcore
2020-03-11T09:22:47.0182979Z Build completed unsuccessfully in 1:18:09
2020-03-11T09:22:47.0182979Z Build completed unsuccessfully in 1:18:09
2020-03-11T09:22:47.0183275Z == clock drift check ==
2020-03-11T09:22:47.0183552Z   local time: Wed Mar 11 09:22:47 UTC 2020
2020-03-11T09:22:47.2915556Z   network time: Wed, 11 Mar 2020 09:22:47 GMT
2020-03-11T09:22:47.2916600Z == end clock drift check ==
2020-03-11T09:22:48.5912328Z 
2020-03-11T09:22:48.5955553Z ##[error]Bash exited with code '1'.
2020-03-11T09:22:48.6047817Z ##[section]Starting: Checkout rust-lang/rust@auto to s
2020-03-11T09:22:48.6051755Z ==============================================================================
2020-03-11T09:22:48.6052040Z Task         : Get sources
2020-03-11T09:22:48.6052349Z 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 @rust-lang/infra. (Feature Requests)

@bors
Copy link
Contributor

bors commented Mar 11, 2020

💔 Test failed - checks-azure

@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 Mar 11, 2020
@Centril Centril closed this Mar 11, 2020
@Centril Centril deleted the rollup-esj3279 branch March 11, 2020 09:34
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.

ICE: index out of bounds with const generics