Skip to content

Fix ICE when querying DefId on Def::Err.#37564

Merged
bors merged 1 commit into
rust-lang:masterfrom
Mark-Simulacrum:sized-ice
Nov 6, 2016
Merged

Fix ICE when querying DefId on Def::Err.#37564
bors merged 1 commit into
rust-lang:masterfrom
Mark-Simulacrum:sized-ice

Conversation

@Mark-Simulacrum

Copy link
Copy Markdown
Member

Also moves computations into check that kind_id is Ok(_), which is in theory an optimization, though I expect it's minor.

Fixes #37534.

r? @eddyb.

@petrochenkov

Copy link
Copy Markdown
Contributor

Test?

@Mark-Simulacrum

Copy link
Copy Markdown
Member Author

Yeah, I need to add that. Where should it go?

@petrochenkov

Copy link
Copy Markdown
Contributor

compile-fail
it'll fail on ICE, but pass on an expected error

Comment thread src/librustc_typeck/collect.rs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be removed, the line above it replaces it.

@eddyb

eddyb commented Nov 3, 2016

Copy link
Copy Markdown
Contributor

@Mark-Simulacrum compile-fail with the original bug report code - the test will succeed if the errors listed in it are found, but fail if there's an ICE or any other crash.

@Mark-Simulacrum

Copy link
Copy Markdown
Member Author

Okay, fixed nits, but I don't know how to fix tidy warning on the long line in compile-fail.

@Mark-Simulacrum

Copy link
Copy Markdown
Member Author

Oh, okay, turns out you can just truncate the error message. Let me know if that's the expected approach. Otherwise I think this is done. r? @eddyb

@eddyb

eddyb commented Nov 3, 2016

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Nov 3, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit d5f72d2 has been approved by eddyb

sophiajt pushed a commit to sophiajt/rust that referenced this pull request Nov 4, 2016
Fix ICE when querying DefId on Def::Err.

Also moves computations into check that `kind_id` is `Ok(_)`, which is in theory an optimization, though I expect it's minor.

Fixes rust-lang#37534.

r? @eddyb.
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Nov 4, 2016
Fix ICE when querying DefId on Def::Err.

Also moves computations into check that `kind_id` is `Ok(_)`, which is in theory an optimization, though I expect it's minor.

Fixes rust-lang#37534.

r? @eddyb.
bors added a commit that referenced this pull request Nov 5, 2016
sophiajt pushed a commit to sophiajt/rust that referenced this pull request Nov 5, 2016
Fix ICE when querying DefId on Def::Err.

Also moves computations into check that `kind_id` is `Ok(_)`, which is in theory an optimization, though I expect it's minor.

Fixes rust-lang#37534.

r? @eddyb.
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Nov 5, 2016
Fix ICE when querying DefId on Def::Err.

Also moves computations into check that `kind_id` is `Ok(_)`, which is in theory an optimization, though I expect it's minor.

Fixes rust-lang#37534.

r? @eddyb.
bors added a commit that referenced this pull request Nov 6, 2016
@bors bors merged commit d5f72d2 into rust-lang:master Nov 6, 2016
@Mark-Simulacrum Mark-Simulacrum deleted the sized-ice branch December 27, 2016 00:30
Sign up for free to 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