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

Evaluate repeat expression lengths as late as possible #69981

Merged
merged 9 commits into from
Mar 24, 2020

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Mar 13, 2020

Fixes #68567

r? @varkor

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 13, 2020
@Centril

This comment has been minimized.

@oli-obk

This comment has been minimized.

@Centril

This comment has been minimized.

@rust-highfive

This comment has been minimized.

src/librustc_const/lib.rs Outdated Show resolved Hide resolved
@varkor
Copy link
Member

varkor commented Mar 14, 2020

Sorry, I've had a half-finished branch to do this for a couple of months, but haven't managed to get back to it. Thanks for taking it on. I'll have a look soon.

@rust-highfive

This comment has been minimized.

@rust-highfive

This comment has been minimized.

Comment on lines -152 to +153
Rvalue::Repeat(ref operand, count) => tcx.mk_array(operand.ty(local_decls, tcx), count),
Rvalue::Repeat(ref operand, count) => {
tcx.mk_ty(ty::Array(operand.ty(local_decls, tcx), count))
Copy link
Member

Choose a reason for hiding this comment

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

I wonder when we can have mk_array take a ty::Const.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Likely never, we have 14 uses in the code base, and half of them are ProjectionKind::SubSlice related.

src/librustc/ty/sty.rs Outdated Show resolved Hide resolved
src/librustc/ty/sty.rs Outdated Show resolved Hide resolved
@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-14T14:57:09.5196886Z ========================== Starting Command Output ===========================
2020-03-14T14:57:09.5213047Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/58df88da-e1fa-4d2b-a653-364c71f6ea70.sh
2020-03-14T14:57:09.7651509Z 
2020-03-14T14:57:09.7686384Z ##[section]Finishing: Disable git automatic line ending conversion
2020-03-14T14:57:09.7723984Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69981/merge to s
2020-03-14T14:57:09.7734753Z Task         : Get sources
2020-03-14T14:57:09.7735786Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-14T14:57:09.7736311Z Version      : 1.0.0
2020-03-14T14:57:09.7736747Z Author       : Microsoft
---
2020-03-14T14:57:11.8939362Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-03-14T14:57:11.9111259Z ##[command]git config gc.auto 0
2020-03-14T14:57:11.9138881Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-03-14T14:57:11.9169375Z ##[command]git config --get-all http.proxy
2020-03-14T14:57:11.9256500Z ##[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/69981/merge:refs/remotes/pull/69981/merge
---
2020-03-14T15:58:18.2244089Z .................................................................................................... 1700/9771
2020-03-14T15:58:22.7512339Z .................................................................................................... 1800/9771
2020-03-14T15:58:34.3934562Z ...................................................................i................................ 1900/9771
2020-03-14T15:58:41.2872163Z .................................................................................................... 2000/9771
2020-03-14T15:58:55.4998420Z .........................................................iiiii...................................... 2100/9771
2020-03-14T15:59:06.2445608Z .................................................................................................... 2300/9771
2020-03-14T15:59:08.4049493Z .................................................................................................... 2400/9771
2020-03-14T15:59:11.5654220Z .................................................................................................... 2500/9771
2020-03-14T15:59:33.1973458Z .................................................................................................... 2600/9771
---
2020-03-14T16:02:07.9533825Z .............................i...............i...................................................... 5000/9771
2020-03-14T16:02:17.2383400Z .................................................................................................... 5100/9771
2020-03-14T16:02:22.9713234Z ........................................................................i........................... 5200/9771
2020-03-14T16:02:28.4278443Z .................................................................................................... 5300/9771
2020-03-14T16:02:37.9574481Z .....................................................ii.ii........i...i............................. 5400/9771
2020-03-14T16:02:46.4395863Z .................................................................................................... 5600/9771
2020-03-14T16:02:56.0938177Z .................................................................................................... 5700/9771
2020-03-14T16:03:02.4160314Z .............................................i...................................................... 5800/9771
2020-03-14T16:03:09.0998048Z .................................................................................................... 5900/9771
2020-03-14T16:03:09.0998048Z .................................................................................................... 5900/9771
2020-03-14T16:03:19.6578408Z .................................................................................................... 6000/9771
2020-03-14T16:03:25.5289939Z .......................................ii...i..ii...........i....................................... 6100/9771
2020-03-14T16:03:45.6145638Z .................................................................................................... 6300/9771
2020-03-14T16:03:52.5059186Z .................................................................................................... 6400/9771
2020-03-14T16:03:52.5059186Z .................................................................................................... 6400/9771
2020-03-14T16:04:01.7735406Z .....................................................................i..ii.......................... 6500/9771
2020-03-14T16:04:24.4365236Z .................................................................................................... 6700/9771
2020-03-14T16:04:32.7435463Z ...................................................................i................................ 6800/9771
2020-03-14T16:04:34.7101691Z .................................................................................................... 6900/9771
2020-03-14T16:04:36.8681023Z .................................................................................................... 7000/9771
---
2020-03-14T16:06:20.8712951Z .................................................................................................... 7800/9771
2020-03-14T16:06:27.0607944Z .................................................................................................... 7900/9771
2020-03-14T16:06:32.8302365Z ...................................................i................................................ 8000/9771
2020-03-14T16:06:43.4410195Z .................................................................................................... 8100/9771
2020-03-14T16:06:48.8608572Z iiiiiiiiii.i........................................................................................ 8200/9771
2020-03-14T16:07:02.7246273Z .................................................................................................... 8400/9771
2020-03-14T16:07:13.9419922Z .................................................................................................... 8500/9771
2020-03-14T16:07:26.7605754Z .................................................................................................... 8600/9771
2020-03-14T16:07:32.6952276Z .................................................................................................... 8700/9771
---
2020-03-14T16:09:24.2821601Z -   --> $DIR/issue-62504.rs:18:25
2020-03-14T16:09:24.2821886Z + error[E0308]: mismatched types
2020-03-14T16:09:24.2822373Z +   --> $DIR/issue-62504.rs:18:21
2020-03-14T16:09:24.2822595Z 3    |
2020-03-14T16:09:24.2822847Z 4 LL |         ArrayHolder([0; Self::SIZE])
2020-03-14T16:09:24.2824036Z +    |                     ^^^^^^^^^^^^^^^ expected `X`, found `Self::SIZE`
2020-03-14T16:09:24.2824366Z +    |
2020-03-14T16:09:24.2824366Z +    |
2020-03-14T16:09:24.2824745Z +    = note: expected array `[u32; _]`
2020-03-14T16:09:24.2825032Z +               found array `[u32; _]`
2020-03-14T16:09:24.2826201Z 7 error: aborting due to previous error
2020-03-14T16:09:24.2826439Z 8 
2020-03-14T16:09:24.2826556Z 
2020-03-14T16:09:24.2827171Z + For more information about this error, try `rustc --explain E0308`.
2020-03-14T16:09:24.2827171Z + For more information about this error, try `rustc --explain E0308`.
2020-03-14T16:09:24.2827473Z 9 
2020-03-14T16:09:24.2827589Z 
2020-03-14T16:09:24.2827699Z 
2020-03-14T16:09:24.2827931Z The actual stderr differed from the expected stderr.
2020-03-14T16:09:24.2828728Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/issues/issue-62504/issue-62504.stderr
2020-03-14T16:09:24.2829455Z To update references, rerun the tests and pass the `--bless` flag
2020-03-14T16:09:24.2830181Z To only update this specific test, also pass `--test-args const-generics/issues/issue-62504.rs`
2020-03-14T16:09:24.2830698Z error: 1 errors occurred comparing output.
2020-03-14T16:09:24.2831258Z status: exit code: 1
2020-03-14T16:09:24.2831258Z status: exit code: 1
2020-03-14T16:09:24.2833586Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/const-generics/issues/issue-62504.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/const-generics/issues/issue-62504" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-A" "unused" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/issues/issue-62504/auxiliary"
2020-03-14T16:09:24.2835455Z ------------------------------------------
2020-03-14T16:09:24.2835663Z 
2020-03-14T16:09:24.2836090Z ------------------------------------------
2020-03-14T16:09:24.2836322Z stderr:
2020-03-14T16:09:24.2836322Z stderr:
2020-03-14T16:09:24.2836743Z ------------------------------------------
2020-03-14T16:09:24.2837026Z error[E0308]: mismatched types
2020-03-14T16:09:24.2837616Z   --> /checkout/src/test/ui/const-generics/issues/issue-62504.rs:18:21
2020-03-14T16:09:24.2837910Z    |
2020-03-14T16:09:24.2838154Z LL |         ArrayHolder([0; Self::SIZE])
2020-03-14T16:09:24.2838584Z    |                     ^^^^^^^^^^^^^^^ expected `X`, found `Self::SIZE`
2020-03-14T16:09:24.2838924Z    |
2020-03-14T16:09:24.2839139Z    = note: expected array `[u32; _]`
2020-03-14T16:09:24.2839438Z               found array `[u32; _]`
2020-03-14T16:09:24.2839825Z error: aborting due to previous error
2020-03-14T16:09:24.2840011Z 
2020-03-14T16:09:24.2840518Z For more information about this error, try `rustc --explain E0308`.
2020-03-14T16:09:24.2840765Z 
2020-03-14T16:09:24.2840765Z 
2020-03-14T16:09:24.2841172Z ------------------------------------------
2020-03-14T16:09:24.2841367Z 
2020-03-14T16:09:24.2841495Z 
2020-03-14T16:09:24.2841958Z ---- [ui] ui/const-generics/issues/issue-67739.rs stdout ----
2020-03-14T16:09:24.2842197Z 
2020-03-14T16:09:24.2842488Z error: Error: expected failure status (Some(1)) but received status Some(101).
2020-03-14T16:09:24.2842851Z status: exit code: 101
2020-03-14T16:09:24.2845240Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/const-generics/issues/issue-67739.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/const-generics/issues/issue-67739" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-A" "unused" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/issues/issue-67739/auxiliary"
2020-03-14T16:09:24.2847152Z ------------------------------------------
2020-03-14T16:09:24.2847461Z 
2020-03-14T16:09:24.2847898Z ------------------------------------------
2020-03-14T16:09:24.2848128Z stderr:
2020-03-14T16:09:24.2848128Z stderr:
2020-03-14T16:09:24.2848539Z ------------------------------------------
2020-03-14T16:09:24.2849523Z error: internal compiler error: src/librustc_traits/normalize_erasing_regions.rs:35: could not fully normalize `fn() -> usize {std::mem::size_of::<<Self as Trait>::Associated>}`
2020-03-14T16:09:24.2850563Z thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:880:9
2020-03-14T16:09:24.2851017Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-03-14T16:09:24.2851282Z 
2020-03-14T16:09:24.2851527Z note: the compiler unexpectedly panicked. this is a bug.
2020-03-14T16:09:24.2851527Z note: the compiler unexpectedly panicked. this is a bug.
2020-03-14T16:09:24.2851769Z 
2020-03-14T16:09:24.2852533Z note: we would appreciate a bug report: ***/blob/master/CONTRIBUTING.md#bug-reports
2020-03-14T16:09:24.2853429Z note: rustc 1.43.0-nightly (83cb194a9 2020-03-14) running on x86_64-unknown-linux-gnu
2020-03-14T16:09:24.2853719Z 
2020-03-14T16:09:24.2853719Z 
2020-03-14T16:09:24.2854425Z 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-03-14T16:09:24.2856225Z error: aborting due to previous error
2020-03-14T16:09:24.2856412Z 
2020-03-14T16:09:24.2856520Z 
2020-03-14T16:09:24.2856996Z ------------------------------------------
---
2020-03-14T16:09:24.2882456Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
2020-03-14T16:09:24.2882954Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-03-14T16:09:24.2895802Z 
2020-03-14T16:09:24.2895957Z 
2020-03-14T16:09:24.2899294Z 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" "--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\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-03-14T16:09:24.2901661Z 
2020-03-14T16:09:24.2901749Z 
2020-03-14T16:09:24.2977708Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2020-03-14T16:09:24.2978200Z Build completed unsuccessfully in 1:05:08
2020-03-14T16:09:24.2978200Z Build completed unsuccessfully in 1:05:08
2020-03-14T16:09:24.2980251Z == clock drift check ==
2020-03-14T16:09:24.3007952Z   local time: Sat Mar 14 16:09:24 UTC 2020
2020-03-14T16:09:24.6026204Z   network time: Sat, 14 Mar 2020 16:09:24 GMT
2020-03-14T16:09:24.6032352Z == end clock drift check ==
2020-03-14T16:09:25.1719411Z 
2020-03-14T16:09:25.1799766Z ##[error]Bash exited with code '1'.
2020-03-14T16:09:25.1816262Z ##[section]Finishing: Run build
2020-03-14T16:09:25.1864334Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69981/merge to s
2020-03-14T16:09:25.1868896Z Task         : Get sources
2020-03-14T16:09:25.1869213Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-14T16:09:25.1869486Z Version      : 1.0.0
2020-03-14T16:09:25.1869680Z Author       : Microsoft
2020-03-14T16:09:25.1869680Z Author       : Microsoft
2020-03-14T16:09:25.1870002Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-03-14T16:09:25.1870354Z ==============================================================================
2020-03-14T16:09:25.5631034Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-03-14T16:09:25.5673466Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/69981/merge to s
2020-03-14T16:09:25.5772947Z Cleaning up task key
2020-03-14T16:09:25.5774008Z Start cleaning up orphan processes.
2020-03-14T16:09:25.5942441Z Terminate orphan process: pid (4079) (python)
2020-03-14T16:09:25.6177283Z ##[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)

@bors
Copy link
Contributor

bors commented Mar 14, 2020

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

@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-14T19:13:34.3062030Z ========================== Starting Command Output ===========================
2020-03-14T19:13:34.3065812Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/216ce654-d821-4215-a390-d88f1abb24e9.sh
2020-03-14T19:13:34.3066377Z 
2020-03-14T19:13:34.3071613Z ##[section]Finishing: Disable git automatic line ending conversion
2020-03-14T19:13:34.3092577Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69981/merge to s
2020-03-14T19:13:34.3096174Z Task         : Get sources
2020-03-14T19:13:34.3096527Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-14T19:13:34.3096843Z Version      : 1.0.0
2020-03-14T19:13:34.3097061Z Author       : Microsoft
---
2020-03-14T19:13:35.2994397Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-03-14T19:13:35.3000035Z ##[command]git config gc.auto 0
2020-03-14T19:13:35.3003988Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-03-14T19:13:35.3007640Z ##[command]git config --get-all http.proxy
2020-03-14T19:13:35.3014217Z ##[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/69981/merge:refs/remotes/pull/69981/merge
---
2020-03-14T20:16:22.1709524Z .................................................................................................... 1700/9771
2020-03-14T20:16:26.5549808Z .................................................................................................... 1800/9771
2020-03-14T20:16:38.3208068Z ...................................................................i................................ 1900/9771
2020-03-14T20:16:45.3922599Z .................................................................................................... 2000/9771
2020-03-14T20:17:00.0946750Z .........................................................iiiii...................................... 2100/9771
2020-03-14T20:17:11.2396096Z .................................................................................................... 2300/9771
2020-03-14T20:17:13.4671166Z .................................................................................................... 2400/9771
2020-03-14T20:17:16.6153397Z .................................................................................................... 2500/9771
2020-03-14T20:17:38.8006670Z .................................................................................................... 2600/9771
---
2020-03-14T20:20:17.9068092Z .............................i...............i...................................................... 5000/9771
2020-03-14T20:20:27.8227177Z .................................................................................................... 5100/9771
2020-03-14T20:20:34.1933586Z ........................................................................i........................... 5200/9771
2020-03-14T20:20:40.1691280Z .................................................................................................... 5300/9771
2020-03-14T20:20:50.6076242Z .....................................................ii.ii........i...i............................. 5400/9771
2020-03-14T20:20:59.5908448Z .................................................................................................... 5600/9771
2020-03-14T20:21:09.8135173Z .................................................................................................... 5700/9771
2020-03-14T20:21:16.4605429Z .............................................i...................................................... 5800/9771
2020-03-14T20:21:23.2958209Z .................................................................................................... 5900/9771
2020-03-14T20:21:23.2958209Z .................................................................................................... 5900/9771
2020-03-14T20:21:33.9650134Z .................................................................................................... 6000/9771
2020-03-14T20:21:40.0126089Z .......................................ii...i..ii...........i....................................... 6100/9771
2020-03-14T20:22:00.6263257Z .................................................................................................... 6300/9771
2020-03-14T20:22:07.8115872Z .................................................................................................... 6400/9771
2020-03-14T20:22:07.8115872Z .................................................................................................... 6400/9771
2020-03-14T20:22:17.4962061Z .....................................................................i..ii.......................... 6500/9771
2020-03-14T20:22:40.4805655Z .................................................................................................... 6700/9771
2020-03-14T20:22:48.9045042Z ...................................................................i................................ 6800/9771
2020-03-14T20:22:50.8953284Z .................................................................................................... 6900/9771
2020-03-14T20:22:53.1004761Z .................................................................................................... 7000/9771
---
2020-03-14T20:24:39.5514104Z .................................................................................................... 7800/9771
2020-03-14T20:24:45.7588655Z .................................................................................................... 7900/9771
2020-03-14T20:24:51.8648885Z ...................................................i................................................ 8000/9771
2020-03-14T20:25:02.9087929Z .................................................................................................... 8100/9771
2020-03-14T20:25:08.6676235Z iiiiiiiiii.i........................................................................................ 8200/9771
2020-03-14T20:25:23.2420793Z .................................................................................................... 8400/9771
2020-03-14T20:25:34.3653251Z .................................................................................................... 8500/9771
2020-03-14T20:25:47.7366357Z .................................................................................................... 8600/9771
2020-03-14T20:25:53.7834052Z .................................................................................................... 8700/9771
---
2020-03-14T20:27:49.8302410Z -   --> $DIR/issue-62504.rs:18:25
2020-03-14T20:27:49.8302678Z + error[E0308]: mismatched types
2020-03-14T20:27:49.8303107Z +   --> $DIR/issue-62504.rs:18:21
2020-03-14T20:27:49.8303307Z 3    |
2020-03-14T20:27:49.8303555Z 4 LL |         ArrayHolder([0; Self::SIZE])
2020-03-14T20:27:49.8304374Z +    |                     ^^^^^^^^^^^^^^^ expected `X`, found `Self::SIZE`
2020-03-14T20:27:49.8306559Z +    |
2020-03-14T20:27:49.8306559Z +    |
2020-03-14T20:27:49.8306769Z +    = note: expected array `[u32; _]`
2020-03-14T20:27:49.8307028Z +               found array `[u32; _]`
2020-03-14T20:27:49.8307432Z 7 error: aborting due to previous error
2020-03-14T20:27:49.8307624Z 8 
2020-03-14T20:27:49.8307730Z 
2020-03-14T20:27:49.8308257Z + For more information about this error, try `rustc --explain E0308`.
2020-03-14T20:27:49.8308257Z + For more information about this error, try `rustc --explain E0308`.
2020-03-14T20:27:49.8308505Z 9 
2020-03-14T20:27:49.8308607Z 
2020-03-14T20:27:49.8308888Z 
2020-03-14T20:27:49.8309134Z The actual stderr differed from the expected stderr.
2020-03-14T20:27:49.8309881Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/issues/issue-62504/issue-62504.stderr
2020-03-14T20:27:49.8310689Z To update references, rerun the tests and pass the `--bless` flag
2020-03-14T20:27:49.8311348Z To only update this specific test, also pass `--test-args const-generics/issues/issue-62504.rs`
2020-03-14T20:27:49.8311814Z error: 1 errors occurred comparing output.
2020-03-14T20:27:49.8312077Z status: exit code: 1
2020-03-14T20:27:49.8312077Z status: exit code: 1
2020-03-14T20:27:49.8314130Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/const-generics/issues/issue-62504.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/const-generics/issues/issue-62504" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-A" "unused" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/issues/issue-62504/auxiliary"
2020-03-14T20:27:49.8315825Z ------------------------------------------
2020-03-14T20:27:49.8316052Z 
2020-03-14T20:27:49.8316450Z ------------------------------------------
2020-03-14T20:27:49.8316656Z stderr:
2020-03-14T20:27:49.8316656Z stderr:
2020-03-14T20:27:49.8317022Z ------------------------------------------
2020-03-14T20:27:49.8317294Z error[E0308]: mismatched types
2020-03-14T20:27:49.8317806Z   --> /checkout/src/test/ui/const-generics/issues/issue-62504.rs:18:21
2020-03-14T20:27:49.8318070Z    |
2020-03-14T20:27:49.8318310Z LL |         ArrayHolder([0; Self::SIZE])
2020-03-14T20:27:49.8318680Z    |                     ^^^^^^^^^^^^^^^ expected `X`, found `Self::SIZE`
2020-03-14T20:27:49.8318965Z    |
2020-03-14T20:27:49.8319187Z    = note: expected array `[u32; _]`
2020-03-14T20:27:49.8319441Z               found array `[u32; _]`
2020-03-14T20:27:49.8319816Z error: aborting due to previous error
2020-03-14T20:27:49.8319984Z 
2020-03-14T20:27:49.8320427Z For more information about this error, try `rustc --explain E0308`.
2020-03-14T20:27:49.8320648Z 
2020-03-14T20:27:49.8320648Z 
2020-03-14T20:27:49.8321024Z ------------------------------------------
2020-03-14T20:27:49.8321199Z 
2020-03-14T20:27:49.8321298Z 
2020-03-14T20:27:49.8321710Z ---- [ui] ui/const-generics/issues/issue-67739.rs stdout ----
2020-03-14T20:27:49.8321920Z 
2020-03-14T20:27:49.8322204Z error: Error: expected failure status (Some(1)) but received status Some(101).
2020-03-14T20:27:49.8322513Z status: exit code: 101
2020-03-14T20:27:49.8324859Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/const-generics/issues/issue-67739.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/const-generics/issues/issue-67739" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-A" "unused" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/issues/issue-67739/auxiliary"
2020-03-14T20:27:49.8329694Z ------------------------------------------
2020-03-14T20:27:49.8329876Z 
2020-03-14T20:27:49.8330249Z ------------------------------------------
2020-03-14T20:27:49.8330454Z stderr:
2020-03-14T20:27:49.8330454Z stderr:
2020-03-14T20:27:49.8330847Z ------------------------------------------
2020-03-14T20:27:49.8331715Z error: internal compiler error: src/librustc_traits/normalize_erasing_regions.rs:35: could not fully normalize `fn() -> usize {std::mem::size_of::<<Self as Trait>::Associated>}`
2020-03-14T20:27:49.8332841Z thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:880:9
2020-03-14T20:27:49.8333250Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-03-14T20:27:49.8343091Z 
2020-03-14T20:27:49.8343464Z note: the compiler unexpectedly panicked. this is a bug.
2020-03-14T20:27:49.8343464Z note: the compiler unexpectedly panicked. this is a bug.
2020-03-14T20:27:49.8343671Z 
2020-03-14T20:27:49.8344829Z note: we would appreciate a bug report: ***/blob/master/CONTRIBUTING.md#bug-reports
2020-03-14T20:27:49.8345138Z 
2020-03-14T20:27:49.8345723Z note: rustc 1.43.0-nightly (dab99769e 2020-03-14) running on x86_64-unknown-linux-gnu
2020-03-14T20:27:49.8345980Z 
2020-03-14T20:27:49.8346623Z 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-03-14T20:27:49.8347192Z error: aborting due to previous error
2020-03-14T20:27:49.8347362Z 
2020-03-14T20:27:49.8347460Z 
2020-03-14T20:27:49.8347847Z ------------------------------------------
---
2020-03-14T20:27:49.8349989Z test result: FAILED. 9712 passed; 2 failed; 57 ignored; 0 measured; 0 filtered out
2020-03-14T20:27:49.8350262Z 
2020-03-14T20:27:49.8350450Z 
2020-03-14T20:27:49.8350548Z 
2020-03-14T20:27:49.8354296Z 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" "--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\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-03-14T20:27:49.8357013Z 
2020-03-14T20:27:49.8357137Z 
2020-03-14T20:27:49.8357656Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
2020-03-14T20:27:49.8358082Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-03-14T20:27:49.8358082Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-03-14T20:27:49.8358489Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2020-03-14T20:27:49.8358819Z Build completed unsuccessfully in 1:07:15
2020-03-14T20:27:49.8393545Z == clock drift check ==
2020-03-14T20:27:49.8410162Z   local time: Sat Mar 14 20:27:49 UTC 2020
2020-03-14T20:27:50.3943661Z   network time: Sat, 14 Mar 2020 20:27:50 GMT
2020-03-14T20:27:50.3945344Z == end clock drift check ==
2020-03-14T20:27:50.9738449Z 
2020-03-14T20:27:50.9819163Z ##[error]Bash exited with code '1'.
2020-03-14T20:27:50.9835654Z ##[section]Finishing: Run build
2020-03-14T20:27:50.9894208Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69981/merge to s
2020-03-14T20:27:50.9900191Z Task         : Get sources
2020-03-14T20:27:50.9900584Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-14T20:27:50.9900963Z Version      : 1.0.0
2020-03-14T20:27:50.9901220Z Author       : Microsoft
2020-03-14T20:27:50.9901220Z Author       : Microsoft
2020-03-14T20:27:50.9901835Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-03-14T20:27:50.9902319Z ==============================================================================
2020-03-14T20:27:51.3588377Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-03-14T20:27:51.3664222Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/69981/merge to s
2020-03-14T20:27:51.3759474Z Cleaning up task key
2020-03-14T20:27:51.3760868Z Start cleaning up orphan processes.
2020-03-14T20:27:51.3957896Z Terminate orphan process: pid (3722) (python)
2020-03-14T20:27:51.4128007Z ##[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)

@Centril Centril added the F-const_generics `#![feature(const_generics)]` label Mar 14, 2020
|
LL | ArrayHolder([0; Self::SIZE])
| ^^^^^^^^^^
| ^^^^^^^^^^^^^^^ expected `X`, found `Self::SIZE`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This span could use some improvement

Centril added a commit to Centril/rust that referenced this pull request Mar 16, 2020
…unimplemented, r=eddyb

Fiddle `ParamEnv` through to a place that used to use `ParamEnv::empty` in a buggy manner

cc rust-lang#69981 (comment)

r? @eddyb
Centril added a commit to Centril/rust that referenced this pull request Mar 16, 2020
…unimplemented, r=eddyb

Fiddle `ParamEnv` through to a place that used to use `ParamEnv::empty` in a buggy manner

cc rust-lang#69981 (comment)

r? @eddyb
Centril added a commit to Centril/rust that referenced this pull request Mar 17, 2020
…unimplemented, r=eddyb

Fiddle `ParamEnv` through to a place that used to use `ParamEnv::empty` in a buggy manner

cc rust-lang#69981 (comment)

r? @eddyb
@eddyb
Copy link
Member

eddyb commented Mar 23, 2020

error: /checkout/src/librustc/mir/mod.rs: too many lines (3007) (add `// ignore-tidy-filelength` to the file to suppress this error)

Sigh, it's that silly error again. (although I suppose a bunch of the impls could be moved to their own modules under rustc::mir)

@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 23, 2020

@bors r=eddyb

@bors
Copy link
Contributor

bors commented Mar 23, 2020

📌 Commit 4f513b5 has been approved by eddyb

@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-review Status: Awaiting review from the assignee but also interested parties. labels Mar 23, 2020
Centril added a commit to Centril/rust that referenced this pull request Mar 23, 2020
Evaluate repeat expression lengths as late as possible

Fixes rust-lang#68567

r? @varkor
@Centril
Copy link
Contributor

Centril commented Mar 23, 2020

You need to ./x.py fmt, @bors r-

@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 23, 2020
@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.
2020-03-23T21:40:57.8004674Z ========================== Starting Command Output ===========================
2020-03-23T21:40:57.8009002Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/e1f2882b-29a4-4756-8bb8-0420bf0f9d93.sh
2020-03-23T21:40:57.8009510Z 
2020-03-23T21:40:57.8016385Z ##[section]Finishing: Disable git automatic line ending conversion
2020-03-23T21:40:57.8035123Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69981/merge to s
2020-03-23T21:40:57.8038250Z Task         : Get sources
2020-03-23T21:40:57.8038533Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-23T21:40:57.8038827Z Version      : 1.0.0
2020-03-23T21:40:57.8039015Z Author       : Microsoft
---
2020-03-23T21:40:58.8140198Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-03-23T21:40:58.8146788Z ##[command]git config gc.auto 0
2020-03-23T21:40:58.8151548Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-03-23T21:40:58.8156391Z ##[command]git config --get-all http.proxy
2020-03-23T21:40:58.8164173Z ##[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/69981/merge:refs/remotes/pull/69981/merge
---
2020-03-23T21:49:17.3122457Z configure: build.locked-deps    := True
2020-03-23T21:49:17.3122756Z configure: llvm.ccache          := sccache
2020-03-23T21:49:17.3123345Z configure: build.cargo-native-static := True
2020-03-23T21:49:17.3123813Z configure: dist.missing-tools   := True
2020-03-23T21:49:17.3124369Z configure: build.configure-args := ['--enable-sccache', '--disable-manage-submodu ...
2020-03-23T21:49:17.3124883Z configure: writing `config.toml` in current directory
2020-03-23T21:49:17.3125122Z configure: 
2020-03-23T21:49:17.3125490Z configure: run `python /checkout/x.py --help`
2020-03-23T21:49:17.3125699Z configure: 
---
2020-03-23T21:56:09.8102803Z skip untracked path src/doc/rust-by-example/ during rustfmt invocations
2020-03-23T21:56:09.8105979Z skip untracked path src/llvm-project/ during rustfmt invocations
2020-03-23T21:56:12.7595602Z Diff in /checkout/src/librustc/ty/sty.rs at line 2390:
2020-03-23T21:56:12.7599864Z  
2020-03-23T21:56:12.7604144Z          let body_id = match tcx.hir().get(hir_id) {
2020-03-23T21:56:12.7608083Z              hir::Node::AnonConst(ac) => ac.body,
2020-03-23T21:56:12.7612469Z -            _ => span_bug!(tcx.def_span(def_id.to_def_id()), "from_anon_const can only process anonymous constants"),
2020-03-23T21:56:12.7617573Z +            _ => span_bug!(
2020-03-23T21:56:12.7622729Z +                tcx.def_span(def_id.to_def_id()),
2020-03-23T21:56:12.7623014Z +                "from_anon_const can only process anonymous constants"
2020-03-23T21:56:12.7653032Z          };
2020-03-23T21:56:12.7653146Z  
2020-03-23T21:56:12.7653338Z          let expr = &tcx.hir().body(body_id).value;
2020-03-23T21:56:12.7653338Z          let expr = &tcx.hir().body(body_id).value;
2020-03-23T21:56:12.7664037Z Running `"/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustfmt" "--config-path" "/checkout" "--edition" "2018" "--unstable-features" "--skip-children" "--check" "/checkout/src/librustc/ty/sty.rs"` failed.
2020-03-23T21:56:12.7665401Z If you're running `tidy`, try again with `--bless` flag. Or, you just want to format code, run `./x.py fmt` instead.
2020-03-23T21:56:12.7679497Z Build completed unsuccessfully in 0:00:35
2020-03-23T21:56:12.7727987Z == clock drift check ==
2020-03-23T21:56:12.7741400Z   local time: Mon Mar 23 21:56:12 UTC 2020
2020-03-23T21:56:13.3137507Z   network time: Mon, 23 Mar 2020 21:56:13 GMT
2020-03-23T21:56:13.3137507Z   network time: Mon, 23 Mar 2020 21:56:13 GMT
2020-03-23T21:56:13.3142349Z == end clock drift check ==
2020-03-23T21:56:14.7972934Z 
2020-03-23T21:56:14.8037810Z ##[error]Bash exited with code '1'.
2020-03-23T21:56:14.8051161Z ##[section]Finishing: Run build
2020-03-23T21:56:14.8095397Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69981/merge to s
2020-03-23T21:56:14.8099967Z Task         : Get sources
2020-03-23T21:56:14.8100681Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-23T21:56:14.8100993Z Version      : 1.0.0
2020-03-23T21:56:14.8101224Z Author       : Microsoft
2020-03-23T21:56:14.8101224Z Author       : Microsoft
2020-03-23T21:56:14.8101554Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-03-23T21:56:14.8101935Z ==============================================================================
2020-03-23T21:56:15.1136056Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-03-23T21:56:15.1182511Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/69981/merge to s
2020-03-23T21:56:15.1264545Z Cleaning up task key
2020-03-23T21:56:15.1265871Z Start cleaning up orphan processes.
2020-03-23T21:56:15.1464669Z Terminate orphan process: pid (3864) (python)
2020-03-23T21:56:15.1718387Z ##[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)

@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 23, 2020

@bors r=eddyb

@bors
Copy link
Contributor

bors commented Mar 23, 2020

📌 Commit 9b1893f has been approved by eddyb

@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 23, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 24, 2020
Rollup of 11 pull requests

Successful merges:

 - rust-lang#67761 (Move the dep_graph construction to a dedicated crate.)
 - rust-lang#69740 (Replace some desc logic in librustc_lint with article_and_desc)
 - rust-lang#69981 (Evaluate repeat expression lengths as late as possible)
 - rust-lang#70087 (Remove const eval loop detector)
 - rust-lang#70242 (Improve E0308 error message wording)
 - rust-lang#70264 (Fix invalid suggestion on `&mut` iterators yielding `&` references)
 - rust-lang#70267 (get rid of ConstPropUnsupported; use ZST marker structs instead)
 - rust-lang#70277 (Remove `ReClosureBound`)
 - rust-lang#70283 (Add regression test for rust-lang#70155.)
 - rust-lang#70294 (Account for bad placeholder types in where clauses)
 - rust-lang#70309 (Clean up E0452 explanation)

Failed merges:

r? @ghost
@bors bors merged commit a73ed5a into rust-lang:master Mar 24, 2020
@oli-obk oli-obk deleted the const_blocks branch March 16, 2021 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-const_generics `#![feature(const_generics)]` S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rvalue::Repeat should hold a ty::Const
7 participants