Skip to content

Resolve: don't compute LastPrivate data for Def::Err to avoid ICE - #31716

Merged
bors merged 2 commits into
rust-lang:masterfrom
jseyfried:fix_privacy_for_def_err
Feb 19, 2016
Merged

Resolve: don't compute LastPrivate data for Def::Err to avoid ICE#31716
bors merged 2 commits into
rust-lang:masterfrom
jseyfried:fix_privacy_for_def_err

Conversation

@jseyfried

Copy link
Copy Markdown
Contributor

Fixes#31714

@alexcrichton

Copy link
Copy Markdown
Member

r? @nrc (more familiar with this since I last touched it)

@jseyfried

Copy link
Copy Markdown
ContributorAuthor

Fixes #31729

Comment threadsrc/test/compile-fail/import.rs Outdated
}

fn main() {
zed::foo(); // Check that this does not panic. Ideally, it would be a privacy error.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you file an issue for this please?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Yeah; in fact, I can fix it now

@nrc

nrc commented Feb 19, 2016

Copy link
Copy Markdown
Member

@bors: r+

@bors

bors commented Feb 19, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit 1b5d2f2 has been approved by nrc

@jseyfried

Copy link
Copy Markdown
ContributorAuthor

@nrc The above commit addresses your comment by making the error for trying to use an inaccessible unresolved import the same as if it the import were resolved.

@jseyfried

Copy link
Copy Markdown
ContributorAuthor

Right now, this error is just "unresolved name" -- it's not a privacy error since we can't use non-pub imports in non-lexical scopes (see #13598).
This could be improved to a more descriptive error -- I can file an issue for that.

@nrc

nrc commented Feb 19, 2016

Copy link
Copy Markdown
Member

Thanks!

@bors: r+

@bors

bors commented Feb 19, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit 08b9097 has been approved by nrc

@bors

bors commented Feb 19, 2016

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 08b9097 with merge 917db28...

@bors
bors merged commit 08b9097 into rust-lang:masterFeb 19, 2016
@jseyfried
jseyfried deleted the fix_privacy_for_def_err branch March 25, 2016 22:58
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@jseyfried@alexcrichton@nrc@bors