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

resolve: Account for new importable entities #59047

Merged
merged 1 commit into from
Mar 17, 2019

Conversation

petrochenkov
Copy link
Contributor

Fixes the ICE encountered in #58837
r? @Centril

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 9, 2019
let module = self.new_module(parent,
ModuleKind::Def(def, ident.name),
def_id,
expansion,
span);
self.define(parent, ident, TypeNS, (module, vis, DUMMY_SP, expansion));
}
Def::Variant(..) | Def::TyAlias(..) | Def::ForeignTy(..) => {
Def::Variant(..) | Def::TyAlias(..) | Def::ForeignTy(..) | Def::Existential(..) |
Def::TraitAlias(..) | Def::PrimTy(..) | Def::ToolMod => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think I understand but to make sure, could you educate me as to why ToolMod uses the TypeNS as opposed to MacroNS (the documentation on hir::def::Def barely exists...)?

Otherwise the PR looks good; r=me with green travis :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ToolMod is very similar to Mod living in type namespace, it's a container for other items.
The difference is that contained items are limited to tool attributes and nested tool modules + the number of contained items is infinite (i.e. no name checks are performed).

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah; that makes sense, thanks!

@Centril
Copy link
Contributor

Centril commented Mar 9, 2019

Btw.. @oli-obk suggested we beta-backport fixing the problem?

@oli-obk oli-obk added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Mar 9, 2019
@oli-obk
Copy link
Contributor

oli-obk commented Mar 9, 2019

Nominating for backport since it makes developing stage 0 less annoying (if you get the ICE you don't get the error that is the actual problem, thus not being able to figure out how to work around the ICE).

@Centril Centril added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 9, 2019
@estebank
Copy link
Contributor

estebank commented Mar 9, 2019

@bors r=Centril

@bors
Copy link
Contributor

bors commented Mar 9, 2019

📌 Commit 967e7f4 has been approved by Centril

@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 9, 2019
Centril added a commit to Centril/rust that referenced this pull request Mar 10, 2019
resolve: Account for new importable entities

Fixes the ICE encountered in rust-lang#58837
r? @Centril
Centril added a commit to Centril/rust that referenced this pull request Mar 10, 2019
resolve: Account for new importable entities

Fixes the ICE encountered in rust-lang#58837
r? @Centril
Centril added a commit to Centril/rust that referenced this pull request Mar 10, 2019
resolve: Account for new importable entities

Fixes the ICE encountered in rust-lang#58837
r? @Centril
Centril added a commit to Centril/rust that referenced this pull request Mar 11, 2019
resolve: Account for new importable entities

Fixes the ICE encountered in rust-lang#58837
r? @Centril
pietroalbini added a commit to pietroalbini/rust that referenced this pull request Mar 13, 2019
resolve: Account for new importable entities

Fixes the ICE encountered in rust-lang#58837
r? @Centril
Centril added a commit to Centril/rust that referenced this pull request Mar 13, 2019
resolve: Account for new importable entities

Fixes the ICE encountered in rust-lang#58837
r? @Centril
@@ -639,24 +639,24 @@ impl<'a> Resolver<'a> {
// but metadata cannot encode gensyms currently, so we create it here.
// This is only a guess, two equivalent idents may incorrectly get different gensyms here.
let ident = ident.gensym_if_underscore();
let def_id = def.def_id();
Copy link
Contributor

Choose a reason for hiding this comment

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

this part of the diff, I presume isn't meaningful -- that is, we're now getting the def_id as part of the match, but in each case, it's the same def_id it was before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the def-ids are the same.

Centril added a commit to Centril/rust that referenced this pull request Mar 16, 2019
resolve: Account for new importable entities

Fixes the ICE encountered in rust-lang#58837
r? @Centril
@bors
Copy link
Contributor

bors commented Mar 17, 2019

⌛ Testing commit 47ee538 with merge 7ea8bbe61b4e5c57f9643d296326a9b4cbb34605...

@Centril
Copy link
Contributor

Centril commented Mar 17, 2019

@bors retry

@bors
Copy link
Contributor

bors commented Mar 17, 2019

⌛ Testing commit 47ee538 with merge 3375b8236553a7aa2d6a9f94486ac5cdea03975a...

@bors
Copy link
Contributor

bors commented Mar 17, 2019

💔 Test failed - checks-travis

@rust-highfive
Copy link
Collaborator

The job arm-android 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:56:12] test string::test_str_clear ... ok
[01:56:12] test string::test_str_truncate ... ok
[01:56:12] test string::test_str_truncate_split_codepoint ... ok
[01:56:12] test string::test_str_truncate_invalid_len ... ok
[01:56:12] died due to signal 11
[01:56:12] 
[01:56:12] 
[01:56:12] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "arm-linux-androideabi" "-j" "4" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "-p" "alloc" "--"
[01:56:12] expected success, got: exit code: 3
---
travis_time:end:04a69204:start=1552803476840448757,finish=1552803476864190150,duration=23741393
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:049946d0
$ 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:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:150ab7b0
travis_time:start:150ab7b0
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:0258b4d8
$ dmesg | grep -i kill

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 bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 17, 2019
@Centril
Copy link
Contributor

Centril commented Mar 17, 2019

@bors retry Seems unrelated to this PR...

@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 17, 2019
@bors
Copy link
Contributor

bors commented Mar 17, 2019

⌛ Testing commit 47ee538 with merge f649c76...

bors added a commit that referenced this pull request Mar 17, 2019
resolve: Account for new importable entities

Fixes the ICE encountered in #58837
r? @Centril
@bors
Copy link
Contributor

bors commented Mar 17, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: Centril
Pushing f649c76 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 17, 2019
@bors bors merged commit 47ee538 into rust-lang:master Mar 17, 2019
@pietroalbini pietroalbini removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Mar 19, 2019
bors added a commit that referenced this pull request Mar 19, 2019
[beta] Rollup backports

Rolled up:

* [beta] Move to static.r-l.o stable release #58896

Cherry-picked:

* Add release notes for PR #56243 #58959
* resolve: Account for new importable entities #59047
* bootstrap: Default to a sensible llvm-suffix. #59173

r? @ghost
bors added a commit that referenced this pull request Mar 26, 2019
…crum

Bump bootstrap compiler to 2019-03-20

Includes #59295 and by extension #59047, which unblocks #58253, #58837, and possibly #59336, and so therefore:

@bors p=50

r? @Mark-Simulacrum

cc @pietroalbini
@petrochenkov petrochenkov deleted the modnodefid branch June 5, 2019 16:33
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. merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants