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

typeck: Save the index of private fields #50693

Merged
merged 1 commit into from
May 14, 2018
Merged

Conversation

dlrobertson
Copy link
Contributor

@dlrobertson dlrobertson commented May 12, 2018

Save the index of all fields regardless of their visibility. Problems
could occur later when attempting to index fields in error recovery if
they are not inserted.

Fixes: #50493

@rust-highfive
Copy link
Collaborator

r? @pnkfelix

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 12, 2018
@pietroalbini pietroalbini added the beta-nominated Nominated for backporting to the compiler in the beta channel. label May 13, 2018
@pietroalbini
Copy link
Member

Nominating for beta backport since this fixes a regression.

r? @petrochenkov

@petrochenkov
Copy link
Contributor

We should rather save index of the private candidate into tables (self.write_field_index(expr.id, priv_candidate_index);) than remove error recovery.

@petrochenkov petrochenkov 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-review Status: Awaiting review from the assignee but also interested parties. labels May 13, 2018
@dlrobertson
Copy link
Contributor Author

dlrobertson commented May 14, 2018

We should rather save index of the private candidate into tables

@petrochenkov Good call! Updated

Save the index of all fields regardless of their visibility. Problems
could occur later when attempting to index fields in error recovery if
they are not inserted.
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented May 14, 2018

📌 Commit 55d9a33 has been approved by petrochenkov

@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 May 14, 2018
@dlrobertson
Copy link
Contributor Author

@petrochenkov I updated the commit (The commit message was no longer valid). bors will probably need another r+

@dlrobertson dlrobertson changed the title typeck: Do not use the field_ty of a private field typeck: Save the index of private fields May 14, 2018
@pietroalbini pietroalbini added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 14, 2018
@petrochenkov
Copy link
Contributor

@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-review Status: Awaiting review from the assignee but also interested parties. labels May 14, 2018
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented May 14, 2018

📌 Commit cdd6139 has been approved by petrochenkov

@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 May 14, 2018
@pietroalbini
Copy link
Member

@bors p=1 (fixes beta regression)

@alexcrichton alexcrichton added the beta-accepted Accepted for backporting to the compiler in the beta channel. label May 14, 2018
@kennytm
Copy link
Member

kennytm commented May 14, 2018

@bors p=79

@bors
Copy link
Contributor

bors commented May 14, 2018

⌛ Testing commit cdd6139 with merge 30a72ad189ffc91338a72ca7e957c60f6082a5e6...

@bors
Copy link
Contributor

bors commented May 14, 2018

💔 Test failed - status-travis

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 14, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-aux 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.
[01:43:51] test workspaces::workspace_with_transitive_dev_deps ... ok
[01:43:51] 
[01:43:51] failures:
[01:43:51] 
[01:43:51] ---- freshness::changing_bin_features_caches_targets stdout ----
[01:43:51]  running `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/cargo build`
[01:43:51] running `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/cit/t532/foo/target/debug/off1`
[01:43:51] thread 'freshness::changing_bin_features_caches_targets' panicked at '
[01:43:51] Expected: execs
[01:43:51]     but: could not exec process `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/cit/t532/foo/target/debug/off1`: could not execute process `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/cit/t532/foo/target/debug/off1` (never executed)
[01:43:51] caused by: could not execute process `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/cit/t532/foo/target/debug/off1` (never executed)
[01:43:51] caused by: Text file busy (os error 26)', tools/cargo/tests/testsuite/hamcrest.rs:13:9
[01:43:51] 
[01:43:51] 
[01:43:51] failures:
[01:43:51]     freshness::changing_bin_features_caches_targets
---
[01:43:51] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "--release" "--locked" "--color" "always" "--manifest-path" "/checkout/src/tools/cargo/Cargo.toml"
[01:43:51] expected success, got: exit code: 101
[01:43:51] 
[01:43:51] 
[01:43:51] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/test/pretty src/test/run-pass/pretty src/test/run-fail/pretty src/test/run-pass-valgrind/pretty src/test/run-pass-fulldeps/pretty src/test/run-fail-fulldeps/pretty src/tools/cargo src/tools/cargotest
[01:43:51] Build completed unsuccessfully in 0:36:16
[01:43:51] make: *** [check-aux] Error 1
[01:43:51] Makefile:60: recipe for target 'check-aux' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0835b768
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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)

1 similar comment
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-aux 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.
[01:43:51] test workspaces::workspace_with_transitive_dev_deps ... ok
[01:43:51] 
[01:43:51] failures:
[01:43:51] 
[01:43:51] ---- freshness::changing_bin_features_caches_targets stdout ----
[01:43:51]  running `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/cargo build`
[01:43:51] running `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/cit/t532/foo/target/debug/off1`
[01:43:51] thread 'freshness::changing_bin_features_caches_targets' panicked at '
[01:43:51] Expected: execs
[01:43:51]     but: could not exec process `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/cit/t532/foo/target/debug/off1`: could not execute process `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/cit/t532/foo/target/debug/off1` (never executed)
[01:43:51] caused by: could not execute process `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/cit/t532/foo/target/debug/off1` (never executed)
[01:43:51] caused by: Text file busy (os error 26)', tools/cargo/tests/testsuite/hamcrest.rs:13:9
[01:43:51] 
[01:43:51] 
[01:43:51] failures:
[01:43:51]     freshness::changing_bin_features_caches_targets
---
[01:43:51] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "--release" "--locked" "--color" "always" "--manifest-path" "/checkout/src/tools/cargo/Cargo.toml"
[01:43:51] expected success, got: exit code: 101
[01:43:51] 
[01:43:51] 
[01:43:51] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/test/pretty src/test/run-pass/pretty src/test/run-fail/pretty src/test/run-pass-valgrind/pretty src/test/run-pass-fulldeps/pretty src/test/run-fail-fulldeps/pretty src/tools/cargo src/tools/cargotest
[01:43:51] Build completed unsuccessfully in 0:36:16
[01:43:51] make: *** [check-aux] Error 1
[01:43:51] Makefile:60: recipe for target 'check-aux' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0835b768
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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)

@dlrobertson
Copy link
Contributor Author

dlrobertson commented May 14, 2018

Is the error related to rust-lang/cargo#5493 or rust-lang/cargo#5481? Or is it a known intermittent failure? It doesn't look related to the changes here, but I could be wrong.

@pietroalbini
Copy link
Member

Seems to be spurious. Let's retry...

@bors retry

@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 May 14, 2018
@bors
Copy link
Contributor

bors commented May 14, 2018

⌛ Testing commit cdd6139 with merge ac5c084...

bors added a commit that referenced this pull request May 14, 2018
typeck: Save the index of private fields

Save the index of all fields regardless of their visibility. Problems
could occur later when attempting to index fields in error recovery if
they are not inserted.

Fixes: #50493
@bors
Copy link
Contributor

bors commented May 14, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: petrochenkov
Pushing ac5c084 to master...

@bors bors merged commit cdd6139 into rust-lang:master May 14, 2018
@dlrobertson dlrobertson deleted the fix_50493 branch May 14, 2018 23:50
@alexcrichton alexcrichton removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label May 15, 2018
bors added a commit that referenced this pull request May 15, 2018
[beta] Process backports

Merged on master:

* #50648: Fix volatile_store and nontemporal_store
* #50735: rustc: don't trip an assertion for enums with present but uninhabited variants.
* #50693: typeck: Save the index of private fields
* #50748: Update stdsimd module
* #50694: Fix self referential impl Trait substitutions

r? @alexcrichton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. 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.

8 participants