-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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: Unexpected parameter Type(Repr) when substituting in region
#112510
Comments
This is conceptually a dupe of #111828, even if the code differs a bit. |
Wait no it's literally a duplicate, the code looks identical to me haha |
code isn't identical @@ -1,6 +1,3 @@
-#![feature(impl_trait_in_assoc_type)]
-#![crate_type="lib"]
-
use std::future::Future;
trait Stream {}
@@ -17,7 +14,7 @@
struct Y;
impl X for Y {
- type LineStream<T> = impl Stream;
+ type LineStream<'a, 'b, T, U> = impl Stream;
type LineStreamFut<'a, Repr> = impl Future<Output = Self::LineStream<'a, Repr>>;
fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {}
} the old one still crashes with
though, do they have the same cause? |
Yes they do have the same cause. The crate_type attr doesn't change the behavior meaningfully in this case, nor does the feature branch since it's just used to emit error messages (doesn't affect lowering). The choice of generics in that |
…-in-OpaqueTypeCollector, r=oli-obk Don't substitute a GAT that has mismatched generics in `OpaqueTypeCollector` Fixes rust-lang#111828 I didn't put up minimized UI tests for rust-lang#112510 or rust-lang#112873 because they'd minimize to literally the same code, but with different substs on the trait/impl. I don't think that warrants duplicate tests given the nature of the fix. r? `@oli-obk` ---- Side-note: I checked, and this isn't fixed by rust-lang#112652 -- I think we discussed whether or not that PR fixed it either intentionally or by accident. The code here isn't really touched by that PR either as far as I can tell? Also, sorry, did some other drive-bys. Hope it doesn't make rebasing rust-lang#112652 too difficult 😅
Code
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: