-
Notifications
You must be signed in to change notification settings - Fork 13k
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 when trying to infer parameter in impl Trait type alias #77179
Comments
The backtrace suggests that ICE is caused by error formatting machinery. This is a corner case that should be fixed, but my original intention was to provide a concrete type. Sadly, it didn't work out either: #![feature(type_alias_impl_trait)]
type Pointer<T> = impl std::ops::Deref<Target=T>;
fn test() -> Pointer<i32> {
Box::new(1)
}
fn main() {
println!("{:?}", *test());
} results in:
Will this be possible one day? My intuition tells me that the snippet above should work. Apologies if this is an improper place for such questions. |
The original no longer ICEs since #87200, however the following does type Pointer<T> = impl std::ops::Deref<Target=T>;
fn main() {
let p: Pointer<_> = Box::new(1);
} Maybe a different ICE?
|
And the above no longer ICEs since #87141 |
Add some TAIT-related regression tests Closes rust-lang#74280, closes rust-lang#77179. r? `@oli-obk`
Code
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: