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

perf: Eagerly convert literals to consts #68118

Merged
merged 4 commits into from Jan 15, 2020
Merged

Conversation

@skinny121
Copy link
Contributor

skinny121 commented Jan 11, 2020

Previousely even literal constants were being converted to an Unevaluted constant for evaluation later. This seems unecessary as no more information is needed to be able to convert the literal to a mir constant.

Hopefully this will also minimise the performance impact of #67717, as far less constant evaluations are needed.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 11, 2020

r? @eddyb

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

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 11, 2020

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-01-11T04:23:37.6659884Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-01-11T04:23:37.6741288Z ##[command]git config gc.auto 0
2020-01-11T04:23:37.6822100Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-01-11T04:23:37.6878326Z ##[command]git config --get-all http.proxy
2020-01-11T04:23:37.7013313Z ##[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/68118/merge:refs/remotes/pull/68118/merge
---
2020-01-11T05:23:57.6810290Z .......................................i...............i............................................ 4900/9511
2020-01-11T05:24:06.3682453Z .................................................................................................... 5000/9511
2020-01-11T05:24:12.5983566Z ....................................................................................i............... 5100/9511
2020-01-11T05:24:18.1744476Z .................................................................................................... 5200/9511
2020-01-11T05:24:28.3112570Z ...................................................ii.ii...........i................................ 5300/9511
2020-01-11T05:24:37.1794028Z .................................................................................................... 5500/9511
2020-01-11T05:24:46.9746174Z .................................................................................................... 5600/9511
2020-01-11T05:24:53.6327066Z ...................................i................................................................ 5700/9511
2020-01-11T05:24:59.7364722Z .................................................................................................... 5800/9511
2020-01-11T05:24:59.7364722Z .................................................................................................... 5800/9511
2020-01-11T05:25:10.1556909Z .................................................................................................... 5900/9511
2020-01-11T05:25:19.9541080Z ..........................ii...i..ii...........i.................................................... 6000/9511
2020-01-11T05:25:36.6433491Z .................................................................................................... 6200/9511
2020-01-11T05:25:44.1309188Z .................................................................................................... 6300/9511
2020-01-11T05:25:44.1309188Z .................................................................................................... 6300/9511
2020-01-11T05:25:52.7700298Z .....................................................i..ii.......................................... 6400/9511
2020-01-11T05:26:17.9821763Z .................................................................................................... 6600/9511
2020-01-11T05:26:19.8806664Z ............................i....................................................................... 6700/9511
2020-01-11T05:26:22.0166047Z .................................................................................................... 6800/9511
2020-01-11T05:26:24.2815104Z ............................i....................................................................... 6900/9511
---
2020-01-11T05:27:59.0797307Z .................................................................................................... 7500/9511
2020-01-11T05:28:02.9512413Z .................................................................................................... 7600/9511
2020-01-11T05:28:08.8143089Z .................................................................................................... 7700/9511
2020-01-11T05:28:16.3792567Z .................................................................................................... 7800/9511
2020-01-11T05:28:25.4073505Z ..............................................................................iiii.................. 7900/9511
2020-01-11T05:28:40.7302523Z ...........i......i................................................................................. 8100/9511
2020-01-11T05:28:45.3581198Z .................................................................................................... 8200/9511
2020-01-11T05:28:57.6358623Z .................................................................................................... 8300/9511
2020-01-11T05:29:06.3556206Z .................................................................................................... 8400/9511
---
2020-01-11T05:31:18.2398142Z  finished in 6.288
2020-01-11T05:31:18.2557028Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-11T05:31:18.3948994Z 
2020-01-11T05:31:18.3949175Z running 166 tests
2020-01-11T05:31:21.0607432Z iiii......i........ii..iiii...i....i...........i............i..i..................i....i............ 100/166
2020-01-11T05:31:23.2084136Z i.i.i...iii..iiiiiii.......................iii............ii......
2020-01-11T05:31:23.2087735Z 
2020-01-11T05:31:23.2091740Z  finished in 4.953
2020-01-11T05:31:23.2262539Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-11T05:31:23.3689215Z 
---
2020-01-11T05:31:25.1758232Z  finished in 1.949
2020-01-11T05:31:25.1928176Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-11T05:31:25.3342443Z 
2020-01-11T05:31:25.3343846Z running 9 tests
2020-01-11T05:31:25.3348155Z iiiiiiiii
2020-01-11T05:31:25.3349616Z 
2020-01-11T05:31:25.3352792Z  finished in 0.142
2020-01-11T05:31:25.3511069Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-11T05:31:25.5017700Z 
---
2020-01-11T05:31:44.6596608Z  finished in 19.307
2020-01-11T05:31:44.6783316Z Check compiletest suite=debuginfo mode=debuginfo-gdb+lldb (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-11T05:31:44.8385303Z 
2020-01-11T05:31:44.8386124Z running 124 tests
2020-01-11T05:32:08.0804707Z .iiiii..ii.....i..i...i..i.i.i..i..i..iii....ii.ii....ii..........iiii..........i.....i..ii.......ii 100/124
2020-01-11T05:32:12.0386804Z .i.iii.....iiiiii.....ii
2020-01-11T05:32:12.0387319Z 
2020-01-11T05:32:12.9560661Z  finished in 27.360
2020-01-11T05:32:12.9582936Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-11T05:32:12.9583303Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2020-01-11T05:39:18.1227686Z failures:
2020-01-11T05:39:18.1228217Z 
2020-01-11T05:39:18.1228950Z ---- [rustdoc] rustdoc/const-generics/add-impl.rs stdout ----
2020-01-11T05:39:18.1229272Z 
2020-01-11T05:39:18.1229583Z error: htmldocck failed!
2020-01-11T05:39:18.1229825Z status: exit code: 1
2020-01-11T05:39:18.1230525Z command: "/usr/bin/python2.7" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/const-generics/add-impl" "/checkout/src/test/rustdoc/const-generics/add-impl.rs"
2020-01-11T05:39:18.1231995Z ------------------------------------------
2020-01-11T05:39:18.1232307Z 
2020-01-11T05:39:18.1232740Z ------------------------------------------
2020-01-11T05:39:18.1233000Z stderr:
2020-01-11T05:39:18.1233000Z stderr:
2020-01-11T05:39:18.1233786Z ------------------------------------------
2020-01-11T05:39:18.1234664Z 14: @has check failed
2020-01-11T05:39:18.1236030Z  `XPATH PATTERN` did not match
2020-01-11T05:39:18.1237477Z  // @has foo/struct.Simd.html '//div[@id="implementations-list"]/h3/code' 'impl Add<Simd<u8, 16>> for Simd<u8, 16>'
2020-01-11T05:39:18.1238228Z Encountered 1 errors
2020-01-11T05:39:18.1238474Z 
2020-01-11T05:39:18.1239012Z ------------------------------------------
2020-01-11T05:39:18.1239301Z 
---
2020-01-11T05:39:18.1242216Z ' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:386:22
2020-01-11T05:39:18.1242696Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2020-01-11T05:39:18.1242874Z 
2020-01-11T05:39:18.1243044Z 
2020-01-11T05:39:18.1244850Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "/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" "--rustdoc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "--src-base" "/checkout/src/test/rustdoc" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "rustdoc" "--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" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-01-11T05:39:18.1247382Z 
2020-01-11T05:39:18.1248253Z 
2020-01-11T05:39:18.1248489Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2020-01-11T05:39:18.1248694Z Build completed unsuccessfully in 1:05:17
2020-01-11T05:39:18.1248694Z Build completed unsuccessfully in 1:05:17
2020-01-11T05:39:18.1291112Z == clock drift check ==
2020-01-11T05:39:18.1309646Z   local time: Sat Jan 11 05:39:18 UTC 2020
2020-01-11T05:39:18.6704919Z   network time: Sat, 11 Jan 2020 05:39:18 GMT
2020-01-11T05:39:18.6705880Z == end clock drift check ==
2020-01-11T05:39:19.9528022Z 
2020-01-11T05:39:19.9633490Z ##[error]Bash exited with code '1'.
2020-01-11T05:39:19.9665415Z ##[section]Starting: Checkout
2020-01-11T05:39:19.9666825Z ==============================================================================
2020-01-11T05:39:19.9666865Z Task         : Get sources
2020-01-11T05:39:19.9666900Z 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)

src/librustc/mir/interpret/mod.rs Outdated Show resolved Hide resolved
src/libsyntax/ast.rs Outdated Show resolved Hide resolved
@skinny121 skinny121 force-pushed the skinny121:eager_lit_eval branch from 952247d to 5a20dba Jan 11, 2020
@jonas-schievink

This comment has been minimized.

Copy link
Member

jonas-schievink commented Jan 11, 2020

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

Copy link

rust-timer commented Jan 11, 2020

Awaiting bors try build completion

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 11, 2020

⌛️ Trying commit 5a20dba with merge 3704c43...

bors added a commit that referenced this pull request Jan 11, 2020
perf: Eagerly convert literals to consts

Previousely even literal constants were being converted to an `Unevaluted` constant for evaluation later. This seems unecessary as no more information is needed to be able to convert the literal to a mir constant.

Hopefully this will also minimise the performance impact of #67717, as far less constant evaluations are needed.
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 11, 2020

☀️ Try build successful - checks-azure
Build commit: 3704c43 (3704c43ab34c106a28a1a1cf463cdeb7df5ff512)

@rust-timer

This comment has been minimized.

Copy link

rust-timer commented Jan 11, 2020

Queued 3704c43 with parent 543b7d9, future comparison URL.

@rust-timer

This comment has been minimized.

Copy link

rust-timer commented Jan 11, 2020

Finished benchmarking try commit 3704c43, comparison URL.

@varkor
varkor approved these changes Jan 13, 2020
Copy link
Member

varkor left a comment

r=me after rebasing.

@varkor varkor assigned varkor and unassigned eddyb Jan 13, 2020
@varkor

This comment has been minimized.

Copy link
Member

varkor commented Jan 13, 2020

@bors p=1 (blocking #67717)

skinny121 added 2 commits Jan 11, 2020
…on unevaluated consts

which requires a lot of unnecessary work to evaluate them further down the line.
@skinny121 skinny121 force-pushed the skinny121:eager_lit_eval branch from 5a20dba to 02fffc1 Jan 13, 2020
@skinny121

This comment has been minimized.

Copy link
Contributor Author

skinny121 commented Jan 13, 2020

Rebased.

@varkor

This comment has been minimized.

Copy link
Member

varkor commented Jan 13, 2020

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 13, 2020

📌 Commit 02fffc1 has been approved by varkor

bors added a commit that referenced this pull request Jan 14, 2020
perf: Eagerly convert literals to consts

Previousely even literal constants were being converted to an `Unevaluted` constant for evaluation later. This seems unecessary as no more information is needed to be able to convert the literal to a mir constant.

Hopefully this will also minimise the performance impact of #67717, as far less constant evaluations are needed.
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 14, 2020

⌛️ Testing commit 02fffc1 with merge 05ae4a7...

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 14, 2020

⌛️ Testing commit 30dba97 with merge 9caca00...

bors added a commit that referenced this pull request Jan 14, 2020
perf: Eagerly convert literals to consts

Previousely even literal constants were being converted to an `Unevaluted` constant for evaluation later. This seems unecessary as no more information is needed to be able to convert the literal to a mir constant.

Hopefully this will also minimise the performance impact of #67717, as far less constant evaluations are needed.
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 14, 2020

The job dist-i586-gnu-i586-i686-musl 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-01-14T15:09:12.7171589Z 
2020-01-14T15:09:12.7171668Z 46 LL |         #[rustc_def_path]
2020-01-14T15:09:12.7171739Z 47    |         ^^^^^^^^^^^^^^^^^
2020-01-14T15:09:12.7171820Z 48 
2020-01-14T15:09:12.7172573Z - error: symbol-name(_ZN209_$LT$$u5b$$RF$dyn$u20$impl1..Foo$u2b$Assoc$u20$$u3d$$u20$extern$u20$$u22$C$u22$$u20$fn$LP$$RF$u8$C$$u20$...$RP$$u2b$impl1..AutoTrait$u3b$$u20$3$u5d$$u20$as$u20$impl1..main..$u7b$$u7b$closure$u7d$$u7d$..Bar$GT$6method17SYMBOL_HASHE)
2020-01-14T15:09:12.7173321Z + error: symbol-name(_ZN209_$LT$$u5b$$RF$dyn$u20$impl1..Foo$u2b$Assoc$u20$$u3d$$u20$extern$u20$$u22$C$u22$$u20$fn$LP$$RF$u8$C$$u20$...$RP$$u2b$impl1..AutoTrait$u3b$$u20$3$u5d$$u20$as$u20$impl1..main..$u7b$$u7b$closure$u7d$$u7d$..Bar$GT$6method17hdb62078998ce7ea8E)
2020-01-14T15:09:12.7173997Z 51    |
2020-01-14T15:09:12.7174059Z 52 LL |             #[rustc_symbol_name]
2020-01-14T15:09:12.7174115Z 
2020-01-14T15:09:12.7174173Z 53    |             ^^^^^^^^^^^^^^^^^^^^
2020-01-14T15:09:12.7174173Z 53    |             ^^^^^^^^^^^^^^^^^^^^
2020-01-14T15:09:12.7174251Z 54 
2020-01-14T15:09:12.7174599Z - error: demangling(<[&dyn impl1::Foo+Assoc = extern "C" fn(&u8, ::.)+impl1::AutoTrait; 3] as impl1::main::{{closure}}::Bar>::method::SYMBOL_HASH)
2020-01-14T15:09:12.7174748Z + error: demangling(<[&dyn impl1::Foo+Assoc = extern "C" fn(&u8, ::.)+impl1::AutoTrait; 3] as impl1::main::{{closure}}::Bar>::method::hdb62078998ce7ea8)
2020-01-14T15:09:12.7175106Z 57    |
2020-01-14T15:09:12.7175178Z 58 LL |             #[rustc_symbol_name]
2020-01-14T15:09:12.7175220Z 
2020-01-14T15:09:12.7175252Z 
2020-01-14T15:09:12.7175252Z 
2020-01-14T15:09:12.7175331Z The actual stderr differed from the expected stderr.
2020-01-14T15:09:12.7175658Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/symbol-names/impl1.legacy/impl1.legacy.stderr
2020-01-14T15:09:12.7175954Z To update references, rerun the tests and pass the `--bless` flag
2020-01-14T15:09:12.7176235Z To only update this specific test, also pass `--test-args symbol-names/impl1.rs`
2020-01-14T15:09:12.7176307Z 
2020-01-14T15:09:12.7176477Z error in revision `legacy`: 1 errors occurred comparing output.
2020-01-14T15:09:12.7176560Z status: exit code: 1
2020-01-14T15:09:12.7177479Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/symbol-names/impl1.rs" "-Zthreads=1" "--target=i586-unknown-linux-gnu" "--cfg" "legacy" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/symbol-names/impl1.legacy" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/i586-unknown-linux-gnu/native/rust-test-helpers" "-Clinker=cc" "-Z" "symbol-mangling-version=legacy" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/symbol-names/impl1.legacy/auxiliary" "-A" "unused"
2020-01-14T15:09:12.7177995Z ------------------------------------------
2020-01-14T15:09:12.7178041Z 
2020-01-14T15:09:12.7178288Z ------------------------------------------
2020-01-14T15:09:12.7178354Z stderr:
2020-01-14T15:09:12.7178354Z stderr:
2020-01-14T15:09:12.7178592Z ------------------------------------------
2020-01-14T15:09:12.7178869Z error: symbol-name(_ZN5impl13foo3Foo3bar17h92cf46db76791039E)
2020-01-14T15:09:12.7179225Z    |
2020-01-14T15:09:12.7179287Z LL |         #[rustc_symbol_name]
2020-01-14T15:09:12.7179480Z    |         ^^^^^^^^^^^^^^^^^^^^
2020-01-14T15:09:12.7179522Z 
2020-01-14T15:09:12.7179522Z 
2020-01-14T15:09:12.7179599Z error: demangling(impl1::foo::Foo::bar::h92cf46db76791039)
2020-01-14T15:09:12.7180505Z    |
2020-01-14T15:09:12.7180576Z LL |         #[rustc_symbol_name]
2020-01-14T15:09:12.7180667Z    |         ^^^^^^^^^^^^^^^^^^^^
2020-01-14T15:09:12.7180711Z 
2020-01-14T15:09:12.7180711Z 
2020-01-14T15:09:12.7181012Z error: demangling-alt(impl1::foo::Foo::bar)
2020-01-14T15:09:12.7181385Z    |
2020-01-14T15:09:12.7181445Z LL |         #[rustc_symbol_name]
2020-01-14T15:09:12.7181527Z    |         ^^^^^^^^^^^^^^^^^^^^
2020-01-14T15:09:12.7181571Z 
2020-01-14T15:09:12.7181571Z 
2020-01-14T15:09:12.7181793Z error: def-path(foo::Foo::bar)
2020-01-14T15:09:12.7182320Z    |
2020-01-14T15:09:12.7182452Z LL |         #[rustc_def_path]
2020-01-14T15:09:12.7182540Z    |         ^^^^^^^^^^^^^^^^^
2020-01-14T15:09:12.7182583Z 
2020-01-14T15:09:12.7182583Z 
2020-01-14T15:09:12.7182920Z error: symbol-name(_ZN5impl13bar33_$LT$impl$u20$impl1..foo..Foo$GT$3baz17h90c4a800b1aa0df0E)
2020-01-14T15:09:12.7183318Z    |
2020-01-14T15:09:12.7183378Z LL |         #[rustc_symbol_name]
2020-01-14T15:09:12.7183458Z    |         ^^^^^^^^^^^^^^^^^^^^
2020-01-14T15:09:12.7183502Z 
2020-01-14T15:09:12.7183502Z 
2020-01-14T15:09:12.7183587Z error: demangling(impl1::bar::<impl impl1::foo::Foo>::baz::h90c4a800b1aa0df0)
2020-01-14T15:09:12.7184181Z    |
2020-01-14T15:09:12.7184237Z LL |         #[rustc_symbol_name]
2020-01-14T15:09:12.7184312Z    |         ^^^^^^^^^^^^^^^^^^^^
2020-01-14T15:09:12.7184362Z 
2020-01-14T15:09:12.7184362Z 
2020-01-14T15:09:12.7184628Z error: demangling-alt(impl1::bar::<impl impl1::foo::Foo>::baz)
2020-01-14T15:09:12.7185190Z    |
2020-01-14T15:09:12.7185245Z LL |         #[rustc_symbol_name]
2020-01-14T15:09:12.7185321Z    |         ^^^^^^^^^^^^^^^^^^^^
2020-01-14T15:09:12.7185362Z 
2020-01-14T15:09:12.7185362Z 
2020-01-14T15:09:12.7185598Z error: def-path(bar::<impl foo::Foo>::baz)
2020-01-14T15:09:12.7185929Z    |
2020-01-14T15:09:12.7185985Z LL |         #[rustc_def_path]
2020-01-14T15:09:12.7186060Z    |         ^^^^^^^^^^^^^^^^^
2020-01-14T15:09:12.7186100Z 
2020-01-14T15:09:12.7186100Z 
2020-01-14T15:09:12.7186605Z error: symbol-name(_ZN209_$LT$$u5b$$RF$dyn$u20$impl1..Foo$u2b$Assoc$u20$$u3d$$u20$extern$u20$$u22$C$u22$$u20$fn$LP$$RF$u8$C$$u20$...$RP$$u2b$impl1..AutoTrait$u3b$$u20$3$u5d$$u20$as$u20$impl1..main..$u7b$$u7b$closure$u7d$$u7d$..Bar$GT$6method17hdb62078998ce7ea8E)
2020-01-14T15:09:12.7187014Z    |
2020-01-14T15:09:12.7187077Z LL |             #[rustc_symbol_name]
2020-01-14T15:09:12.7187157Z    |             ^^^^^^^^^^^^^^^^^^^^
2020-01-14T15:09:12.7187199Z 
2020-01-14T15:09:12.7187199Z 
2020-01-14T15:09:12.7187304Z error: demangling(<[&dyn impl1::Foo+Assoc = extern "C" fn(&u8, ::.)+impl1::AutoTrait; 3] as impl1::main::{{closure}}::Bar>::method::hdb62078998ce7ea8)
2020-01-14T15:09:12.7187671Z    |
2020-01-14T15:09:12.7187728Z LL |             #[rustc_symbol_name]
2020-01-14T15:09:12.7187805Z    |             ^^^^^^^^^^^^^^^^^^^^
2020-01-14T15:09:12.7187846Z 
2020-01-14T15:09:12.7187846Z 
2020-01-14T15:09:12.7188189Z error: demangling-alt(<[&dyn impl1::Foo+Assoc = extern "C" fn(&u8, ::.)+impl1::AutoTrait; 3] as impl1::main::{{closure}}::Bar>::method)
2020-01-14T15:09:12.7188644Z    |
2020-01-14T15:09:12.7188717Z LL |             #[rustc_symbol_name]
2020-01-14T15:09:12.7188782Z    |             ^^^^^^^^^^^^^^^^^^^^
2020-01-14T15:09:12.7188820Z 
2020-01-14T15:09:12.7188820Z 
2020-01-14T15:09:12.7189131Z error: def-path(<[&dyn Foo<Assoc = for<'r> extern "C" fn(&'r u8, ...)> + AutoTrait; 3] as main::{{closure}}#1::Bar>::method)
2020-01-14T15:09:12.7189462Z    |
2020-01-14T15:09:12.7189527Z LL |             #[rustc_def_path]
2020-01-14T15:09:12.7189587Z    |             ^^^^^^^^^^^^^^^^^
2020-01-14T15:09:12.7189625Z 
---
2020-01-14T15:09:12.7197776Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:387:22
2020-01-14T15:09:12.7197883Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2020-01-14T15:09:12.7204862Z 
2020-01-14T15:09:12.7205131Z 
2020-01-14T15:09:12.7207610Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "/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/i586-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-i586-unknown-linux-gnu" "--mode" "ui" "--target" "i586-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--linker" "cc" "--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/i586-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--llvm-version" "9.0.0-rust-1.42.0-nightly\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-01-14T15:09:12.7208740Z 
2020-01-14T15:09:12.7217131Z 
2020-01-14T15:09:12.7217637Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --target i586-unknown-linux-gnu,i686-unknown-linux-musl
2020-01-14T15:09:12.7217775Z Build completed unsuccessfully in 1:15:27
2020-01-14T15:09:12.7217775Z Build completed unsuccessfully in 1:15:27
2020-01-14T15:09:12.7267634Z == clock drift check ==
2020-01-14T15:09:12.7288621Z   local time: Tue Jan 14 15:09:12 UTC 2020
2020-01-14T15:09:12.8344466Z   network time: Tue, 14 Jan 2020 15:09:12 GMT
2020-01-14T15:09:12.8344602Z == end clock drift check ==
2020-01-14T15:09:13.2522084Z 
2020-01-14T15:09:13.2641973Z ##[error]Bash exited with code '1'.
2020-01-14T15:09:13.2686105Z ##[section]Starting: Checkout
2020-01-14T15:09:13.2687869Z ==============================================================================
2020-01-14T15:09:13.2687948Z Task         : Get sources
2020-01-14T15:09:13.2688035Z 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)

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 14, 2020

💔 Test failed - checks-azure

@varkor

This comment has been minimized.

Copy link
Member

varkor commented Jan 14, 2020

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 14, 2020

📌 Commit 583a4fc has been approved by varkor

Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Jan 14, 2020
perf: Eagerly convert literals to consts

Previousely even literal constants were being converted to an `Unevaluted` constant for evaluation later. This seems unecessary as no more information is needed to be able to convert the literal to a mir constant.

Hopefully this will also minimise the performance impact of rust-lang#67717, as far less constant evaluations are needed.
bors added a commit that referenced this pull request Jan 14, 2020
Rollup of 7 pull requests

Successful merges:

 - #66329 (Add unreachable propagation mir optimization pass)
 - #67784 (Reset Formatter flags on exit from pad_integral)
 - #67914 (Don't run const propagation on items with inconsistent bounds)
 - #68012 (Update some of Cargo's dependencies)
 - #68096 (Clean up some diagnostics by making them more consistent)
 - #68118 (perf: Eagerly convert literals to consts)
 - #68123 (Implement Cursor for linked lists. (RFC 2570).)

Failed merges:

r? @ghost
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 15, 2020

⌛️ Testing commit 583a4fc with merge 4b172cc...

bors added a commit that referenced this pull request Jan 15, 2020
perf: Eagerly convert literals to consts

Previousely even literal constants were being converted to an `Unevaluted` constant for evaluation later. This seems unecessary as no more information is needed to be able to convert the literal to a mir constant.

Hopefully this will also minimise the performance impact of #67717, as far less constant evaluations are needed.
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 15, 2020

☀️ Test successful - checks-azure
Approved by: varkor
Pushing 4b172cc to master...

@bors bors added the merged-by-bors label Jan 15, 2020
@bors bors merged commit 583a4fc into rust-lang:master Jan 15, 2020
5 checks passed
5 checks passed
homu Test successful
Details
pr Build #20200114.43 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-7) Linux x86_64-gnu-llvm-7 succeeded
Details
pr (Linux x86_64-gnu-tools) Linux x86_64-gnu-tools succeeded
Details
@eddyb

This comment has been minimized.

Copy link
Member

eddyb commented Jan 16, 2020

@varkor Wait, does this fix [T; 123] in where clauses with #[feature(const_generics)]? Or do we still need to add more special-casing?

@varkor

This comment has been minimized.

Copy link
Member

varkor commented Jan 17, 2020

@eddyb: oh, I think you're right! #67753 seems to be fixed now.

bors added a commit that referenced this pull request Feb 21, 2020
`lit_to_const`: gracefully bubble up type errors.

Fixes #69310 which was injected by #68118.

r? @pnkfelix @varkor @eddyb
cc @skinny121
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

8 participants
You can’t perform that action at this time.