-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
ICE "not a type parameter" on nightly (regression) #62263
Comments
pub type Foo = dyn Bar<B = Self::B>;
pub trait Bar {
type B;
} Error:
Click for backtrace
(weird: double backtrace with different lengths) Not happening on beta (until now) |
Thanks. @Centril The minified error should obviously cause a cyclic error at the very least, but should we try to support |
@alexreg I think we definitely shouldn't accept more code here and the user hasn't said |
Yes, true... the MRE is slightly different in nature from the original. |
@alexreg two more ICE with self in associated types have been reported. Are you having a fix ready? |
triage: P-high, already assigned to @alexreg so leaving as such. |
…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
…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
Repro:
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=c4a8f90dada13368b5749e84b7b01108
This doesn't ICE on beta or stable but gives the following ICE on nightly:
The text was updated successfully, but these errors were encountered: