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

HirIdify hir::ItemId #59413

Merged
merged 3 commits into from
Mar 28, 2019
Merged

HirIdify hir::ItemId #59413

merged 3 commits into from
Mar 28, 2019

Conversation

Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Mar 25, 2019

Version of #59092.

r? @oli-obk

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 25, 2019
@Zoxc Zoxc mentioned this pull request Mar 25, 2019
@ljedrz
Copy link
Contributor

ljedrz commented Mar 25, 2019

Oh, sweet - you were able to crack it 👍.

@oli-obk
Copy link
Contributor

oli-obk commented Mar 25, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Mar 25, 2019

📌 Commit cb4ac71 has been approved by oli-obk

@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 25, 2019
@Zoxc
Copy link
Contributor Author

Zoxc commented Mar 25, 2019

@ljedrz Let's see if the tests pass before celebrating =P

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (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.
travis_time:end:0561cccf:start=1553522842118343460,finish=1553522844362975229,duration=2244631769
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
Setting environment variables from .travis.yml
---
[01:08:23] .................................................................................................... 1400/5488
[01:08:26] .................................................................................................... 1500/5488
[01:08:29] .................................................................................................... 1600/5488
[01:08:32] .........................................i.......................................................... 1700/5488
[01:08:35] .....................................................................................F.............. 1800/5488
[01:08:42] .................................................................................................... 2000/5488
[01:08:46] ...........................................................................i........................ 2100/5488
[01:08:49] .................................................................................................... 2200/5488
[01:08:53] .................................................................................................... 2300/5488
---
[01:10:51] failures:
[01:10:51] 
[01:10:51] ---- [ui] ui/impl-trait/bindings.rs stdout ----
[01:10:51] 
[01:10:51] error: Error: expected failure status (Some(1)) but received status Some(101).
[01:10:51] status: exit code: 101
[01:10:51] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/impl-trait/bindings.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/bindings/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/bindings/auxiliary" "-A" "unused"
[01:10:51] ------------------------------------------
[01:10:51] 
[01:10:51] ------------------------------------------
[01:10:51] stderr:
[01:10:51] stderr:
[01:10:51] ------------------------------------------
[01:10:51] {"message":"attempt to use a non-constant value in a constant","code":{"code":"E0435","explanation":"\nA non-constant value was used in a constant expression.\n\nErroneous code example:\n\n```compile_fail,E0435\nlet foo = 42;\nlet a: [u8; foo]; // error: attempt to use a non-constant value in a constant\n```\n\nTo fix this error, please replace the value with a constant. Example:\n\n```\nlet a: [u8; 42]; // ok!\n```\n\nOr:\n\n```\nconst FOO: usize = 42;\nlet a: [u8; FOO]; // ok!\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/bindings.rs","byte_start":88,"byte_end":89,"line_start":4,"line_end":4,"column_start":29,"column_end":30,"is_primary":true,"text":[{"text":"    const foo: impl Clone = x;","highlight_start":29,"highlight_end":30}],"label":"non-constant value","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0435]: attempt to use a non-constant value in a constant\n  --> /checkout/src/test/ui/impl-trait/bindings.rs:4:29\n   |\nLL |     const foo: impl Clone = x;\n   |                             ^ non-constant value\n\n"}
[01:10:51] {"message":"attempt to use a non-constant value in a constant","code":{"code":"E0435","explanation":"\nA non-constant value was used in a constant expression.\n\nErroneous code example:\n\n```compile_fail,E0435\nlet foo = 42;\nlet a: [u8; foo]; // error: attempt to use a non-constant value in a constant\n```\n\nTo fix this error, please replace the value with a constant. Example:\n\n```\nlet a: [u8; 42]; // ok!\n```\n\nOr:\n\n```\nconst FOO: usize = 42;\nlet a: [u8; FOO]; // ok!\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/bindings.rs","byte_start":236,"byte_end":237,"line_start":10,"line_end":10,"column_start":33,"column_end":34,"is_primary":true,"text":[{"text":"        const foo: impl Clone = x;","highlight_start":33,"highlight_end":34}],"label":"non-constant value","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0435]: attempt to use a non-constant value in a constant\n  --> /checkout/src/test/ui/impl-trait/bindings.rs:10:33\n   |\nLL |         const foo: impl Clone = x;\n   |                                 ^ non-constant value\n\n"}
[01:10:51] {"message":"attempt to use a non-constant value in a constant","code":{"code":"E0435","explanation":"\nA non-constant value was used in a constant expression.\n\nErroneous code example:\n\n```compile_fail,E0435\nlet foo = 42;\nlet a: [u8; foo]; // error: attempt to use a non-constant value in a constant\n```\n\nTo fix this error, please replace the value with a constant. Example:\n\n```\nlet a: [u8; 42]; // ok!\n```\n\nOr:\n\n```\nconst FOO: usize = 42;\nlet a: [u8; FOO]; // ok!\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/bindings.rs","byte_start":389,"byte_end":390,"line_start":17,"line_end":17,"column_start":33,"column_end":34,"is_primary":true,"text":[{"text":"        const foo: impl Clone = x;","highlight_start":33,"highlight_end":34}],"label":"non-constant value","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0435]: attempt to use a non-constant value in a constant\n  --> /checkout/src/test/ui/impl-trait/bindings.rs:17:33\n   |\nLL |         const foo: impl Clone = x;\n   |                                 ^ non-constant value\n\n"}
[01:10:51] {"message":"attempt to use a non-constant value in a constant","code":{"code":"E0435","explanation":"\nA non-constant value was used in a constant expression.\n\nErroneous code example:\n\n```compile_fail,E0435\nlet foo = 42;\nlet a: [u8; foo]; // error: attempt to use a non-constant value in a constant\n```\n\nTo fix this error, please replace the value with a constant. Example:\n\n```\nlet a: [u8; 42]; // ok!\n```\n\nOr:\n\n```\nconst FOO: usize = 42;\nlet a: [u8; FOO]; // ok!\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/bindings.rs","byte_start":551,"byte_end":552,"line_start":24,"line_end":24,"column_start":33,"column_end":34,"is_primary":true,"text":[{"text":"        const foo: impl Clone = x;","highlight_start":33,"highlight_end":34}],"label":"non-constant value","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0435]: attempt to use a non-constant value in a constant\n  --> /checkout/src/test/ui/impl-trait/bindings.rs:24:33\n   |\nLL |         const foo: impl Clone = x;\n   |                                 ^ non-constant value\n\n"}
[01:10:51] thread 'rustc' panicked at 'expected node_id to be lowered already Item {
[01:10:51]     ident: foo#0,
[01:10:51]     attrs: [],
[01:10:51]     id: NodeId(21),
[01:10:51]     node: Const(
[01:10:51]         type(impl Clone),
[01:10:51]         expr(27: x)
[01:10:51]     vis: Spanned {
[01:10:51]         node: Inherited,
[01:10:51]         span: Span {
[01:10:51]         span: Span {
[01:10:51]             lo: BytePos(
[01:10:51]             ),
[01:10:51]             ),
[01:10:51]             hi: BytePos(
[01:10:51]             ),
[01:10:51]             ),
[01:10:51]             ctxt: #0
[01:10:51]     },
[01:10:51]     span: Span {
[01:10:51]     span: Span {
[01:10:51]         lo: BytePos(
[01:10:51]         ),
[01:10:51]         ),
[01:10:51]         hi: BytePos(
[01:10:51]         ),
[01:10:51]         ),
[01:10:51]         ctxt: #0
[01:10:51]     tokens: Some(
[01:10:51]         TokenStream(
[01:10:51]             Some(
[01:10:51]                 [
[01:10:51]                 [
[01:10:51]                     (
[01:10:51]                         Token(
[01:10:51]                             Span {
[01:10:51]                                 lo: BytePos(
[01:10:51]                                 ),
[01:10:51]                                 ),
[01:10:51]                                 hi: BytePos(
[01:10:51]                                 ),
[01:10:51]                                 ),
[01:10:51]                                 ctxt: #0
[01:10:51]                             Ident(
[01:10:51]                                 const#0,
[01:10:51]                                 false
[01:10:51]                             )
[01:10:51]                             )
[01:10:51]                         ),
[01:10:51]                         NonJoint
[01:10:51]                     ),
[01:10:51]                     (
[01:10:51]                         Token(
[01:10:51]                             Span {
[01:10:51]                                 lo: BytePos(
[01:10:51]                                 ),
[01:10:51]                                 ),
[01:10:51]                                 hi: BytePos(
[01:10:51]                                 ),
[01:10:51]                                 ),
[01:10:51]                                 ctxt: #0
[01:10:51]                             Ident(
[01:10:51]                                 foo#0,
[01:10:51]                                 false
[01:10:51]                             )
[01:10:51]                             )
[01:10:51]                         ),
[01:10:51]                         NonJoint
[01:10:51]                     ),
[01:10:51]                     (
[01:10:51]                         Token(
[01:10:51]                             Span {
[01:10:51]                                 lo: BytePos(
[01:10:51]                                 ),
[01:10:51]                                 ),
[01:10:51]                                 hi: BytePos(
[01:10:51]                                 ),
[01:10:51]                                 ),
[01:10:51]                                 ctxt: #0
[01:10:51]                             Colon
[01:10:51]                         ),
[01:10:51]                         NonJoint
[01:10:51]                     ),
[01:10:51]                     ),
[01:10:51]                     (
[01:10:51]                         Token(
[01:10:51]                             Span {
[01:10:51]                                 lo: BytePos(
[01:10:51]                                 ),
[01:10:51]                                 ),
[01:10:51]                                 hi: BytePos(
[01:10:51]                                 ),
[01:10:51]                                 ),
[01:10:51]                                 ctxt: #0
[01:10:51]                             Ident(
[01:10:51]                                 impl#0,
[01:10:51]                                 false
[01:10:51]                             )
[01:10:51]                             )
[01:10:51]                         ),
[01:10:51]                         NonJoint
[01:10:51]                     ),
[01:10:51]                     (
[01:10:51]                         Token(
[01:10:51]                             Span {
[01:10:51]                                 lo: BytePos(
[01:10:51]                                 ),
[01:10:51]                                 ),
[01:10:51]                                 hi: BytePos(
[01:10:51]                                 ),
[01:10:51]                                 ),
[01:10:51]                                 ctxt: #0
[01:10:51]                             Ident(
[01:10:51]                                 Clone#0,
[01:10:51]                                 false
[01:10:51]                             )
[01:10:51]                             )
[01:10:51]                         ),
[01:10:51]                         NonJoint
[01:10:51]                     ),
[01:10:51]                     (
[01:10:51]                         Token(
[01:10:51]                             Span {
[01:10:51]                                 lo: BytePos(
[01:10:51]                                 ),
[01:10:51]                                 ),
[01:10:51]                                 hi: BytePos(
[01:10:51]                                 ),
[01:10:51]                                 ),
[01:10:51]                                 ctxt: #0
[01:10:51]                             Eq
[01:10:51]                         ),
[01:10:51]                         NonJoint
[01:10:51]                     ),
[01:10:51]                     ),
[01:10:51]                     (
[01:10:51]                         Token(
[01:10:51]                             Span {
[01:10:51]                                 lo: BytePos(
[01:10:51]                                 ),
[01:10:51]                                 ),
[01:10:51]                                 hi: BytePos(
[01:10:51]                                 ),
[01:10:51]                                 ),
[01:10:51]                                 ctxt: #0
[01:10:51]                             Ident(
[01:10:51]                                 x#0,
[01:10:51]                                 false
[01:10:51]                             )
[01:10:51]                             )
[01:10:51]                         ),
[01:10:51]                         NonJoint
[01:10:51]                     ),
[01:10:51]                     (
[01:10:51]                         Token(
[01:10:51]                             Span {
[01:10:51]                                 lo: BytePos(
[01:10:51]                                 ),
[01:10:51]                                 ),
[01:10:51]                                 hi: BytePos(
[01:10:51]                                 ),
[01:10:51]                                 ),
[01:10:51]                                 ctxt: #0
[01:10:51]                             Semi
[01:10:51]                         ),
[01:10:51]                         NonJoint
[01:10:51]                     )
---
[01:10:51] note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
[01:10:51] 
[01:10:51] note: rustc 1.35.0-dev running on x86_64-unknown-linux-gnu
[01:10:51] 
[01:10:51] note: compiler flags: -Z threads=1 -Z ui-testing -Z unstable-options -C prefer-dynamic -C rpath
[01:10:51] 
[01:10:51] ------------------------------------------
[01:10:51] 
[01:10:51] thread '[ui] ui/impl-trait/bindings.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3369:9
---
[01:10:51] 
[01:10:51] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:496:22
[01:10:51] 
[01:10:51] 
[01:10:51] 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-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -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" "6.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"
[01:10:51] 
[01:10:51] 
[01:10:51] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:10:51] Build completed unsuccessfully in 0:04:13
[01:10:51] Build completed unsuccessfully in 0:04:13
[01:10:51] make: *** [check] Error 1
[01:10:51] Makefile:48: recipe for target 'check' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0e5f1986
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Mon Mar 25 15:18:26 UTC 2019
---
travis_time:end:0aa41be2:start=1553527107629037674,finish=1553527107633557330,duration=4519656
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:100cd623
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:aft

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)

@oli-obk
Copy link
Contributor

oli-obk commented Mar 25, 2019

@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 25, 2019
@Zoxc
Copy link
Contributor Author

Zoxc commented Mar 25, 2019

I see impl Trait and async stuff also create items, so I guess I have to allocate the HIR counters for those too.

@Zoxc
Copy link
Contributor Author

Zoxc commented Mar 26, 2019

I changed the code to allocate the HIR id counters on demand. That seem to suffice for impl Trait, since it doesn't also create new Defs.

@oli-obk
Copy link
Contributor

oli-obk commented Mar 27, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Mar 27, 2019

📌 Commit f7c66fb has been approved by oli-obk

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

Successful merges:

 - #57987 (Fix some AArch64 typos)
 - #58581 (Refactor generic parameter encoder functions)
 - #58803 (fs::copy() unix: set file mode early)
 - #58848 (Prevent cache issues on version updates)
 - #59198 (Do not complain about unmentioned fields in recovered patterns)
 - #59351 (Include llvm-ar with llvm-tools component)
 - #59413 (HirIdify hir::ItemId)
 - #59441 (Remove the block on natvis for lld-link.)
 - #59448 (Use consistent phrasing for all macro summaries)
 - #59456 (Add documentation about `for` used as higher ranked trait bounds)
 - #59472 (Document that `std::io::BufReader` discards contents on drop)
 - #59474 (Fix link capitalization in documentation of std::io::BufWriter.)

Failed merges:

r? @ghost
@bors bors merged commit f7c66fb into rust-lang:master Mar 28, 2019
@Zoxc Zoxc deleted the hirid branch March 28, 2019 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

5 participants