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

Fix ICEs when Self is used in type aliases #62417

Merged
merged 4 commits into from
Jul 10, 2019

Conversation

alexreg
Copy link
Contributor

@alexreg alexreg commented Jul 5, 2019

I think it is right just to disallow this at resolution stage rather than let typeck produce a cyclic error. This is in line with previous behaviour. There was probably no need at all for the change that introduced this bug in #57428, so I've simply reversed it.

Fixes #62263, #62364, #62305.

r? @eddyb

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 5, 2019
@Centril
Copy link
Contributor

Centril commented Jul 5, 2019

@alexreg Can you add regression tests from the two issues this fixes?
(Ideally named something better than just issues/issue-$number.rs and more like $reasonable_semantic_category/issue-$number-$reasonable_description.rs).

@matthewjasper matthewjasper added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jul 5, 2019
@hellow554
Copy link
Contributor

What about #62305? Should close this as well. Please also add a test for that

@Centril Centril added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jul 6, 2019
@alexreg
Copy link
Contributor Author

alexreg commented Jul 6, 2019

Okay, ready for review & merge now. Anyone feel free to do so.

@pnkfelix
Copy link
Member

pnkfelix commented Jul 9, 2019

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jul 9, 2019

📌 Commit f035630 has been approved by pnkfelix

@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 Jul 9, 2019
@alexreg
Copy link
Contributor Author

alexreg commented Jul 9, 2019

Thanks @pnkfelix!

Centril added a commit to Centril/rust that referenced this pull request Jul 9, 2019
…nkfelix

Fix ICEs when `Self` is used in type aliases

I think it is right just to disallow this at resolution stage rather than let typeck produce a cyclic error. This is in line with previous behaviour. There was probably no need at all for the change that introduced this bug in rust-lang#57428, so I've simply reversed it.

Fixes rust-lang#62263, rust-lang#62364, rust-lang#62305.

r? @eddyb
Centril added a commit to Centril/rust that referenced this pull request Jul 9, 2019
…nkfelix

Fix ICEs when `Self` is used in type aliases

I think it is right just to disallow this at resolution stage rather than let typeck produce a cyclic error. This is in line with previous behaviour. There was probably no need at all for the change that introduced this bug in rust-lang#57428, so I've simply reversed it.

Fixes rust-lang#62263, rust-lang#62364, rust-lang#62305.

r? @eddyb
bors added a commit that referenced this pull request Jul 9, 2019
Rollup of 9 pull requests

Successful merges:

 - #62417 (Fix ICEs when `Self` is used in type aliases)
 - #62450 (Raise the default recursion limit to 128)
 - #62470 (Prevent shrinking of "crate select" element on Firefox)
 - #62515 (cli: make help output for -l and -L consistent)
 - #62520 (Regression test for issue 42574.)
 - #62526 (normalize use of backticks in compiler messages for libsyntax/feature_gate.rs)
 - #62527 (clarify that debug_assert does not completely omits the code)
 - #62535 (ci: Configure $CI_JOB_NAME correctly)
 - #62541 (Add spastorino for rustc-guide toolstate)

Failed merges:

r? @ghost
@bors bors merged commit f035630 into rust-lang:master Jul 10, 2019
@pnkfelix
Copy link
Member

Discussed at T-compiler meeting. accepted for beta backport.

@pnkfelix pnkfelix added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Jul 11, 2019
@pietroalbini pietroalbini removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jul 22, 2019
bors added a commit that referenced this pull request Jul 22, 2019
[beta] Rollup backports

Cherry picked:

* rustc_target: avoid negative register counts in the SysV x86_64 ABI. #62380
* Fix ICEs when `Self` is used in type aliases #62417
* Raise the default recursion limit to 128 #62450
* Handle errors during error recovery gracefully #62604
* Correctly break out of recovery loop #62607
* Cancel unemitted diagnostics during error recovery #62666
* ci: pin awscli dependencies #62856
* Ensure that checkout is with \n line endings #62564

Rolled up:

* [beta] Backport #62615 #62793
* [beta] Fix #62660 #62792

r? @ghost
bors added a commit that referenced this pull request Jul 22, 2019
[beta] Rollup backports

Cherry picked:

* rustc_target: avoid negative register counts in the SysV x86_64 ABI. #62380
* Fix ICEs when `Self` is used in type aliases #62417
* Raise the default recursion limit to 128 #62450
* Handle errors during error recovery gracefully #62604
* Correctly break out of recovery loop #62607
* Cancel unemitted diagnostics during error recovery #62666
* ci: pin awscli dependencies #62856
* Ensure that checkout is with \n line endings #62564

Rolled up:

* [beta] Backport #62615 #62793
* [beta] Fix #62660 #62792

r? @ghost
@alexreg alexreg added the A-type-system Area: Type system label Nov 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-type-system Area: Type system 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. 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.

ICE "not a type parameter" on nightly (regression)
9 participants