Existential type can have inconsistent concrete type #52632
Closed
Description
#![feature(existential_type)]
use std::fmt::Debug;
// Parser workaround. https://github.com/rust-lang/rust/issues/52631
macro_rules! this_is_an_item {
($i:item) => { $i };
}
fn main() {
this_is_an_item! {
existential type Existential: Debug;
}
fn _unused() -> Existential { String::new() }
let null = || -> Existential { 0 };
println!("{:?}", null());
}
Segmentation fault (core dumped)
Mentioning the existential types tracking issue #34511
Mentioning @oli-obk and @cramertj
Metadata
Assignees
Labels
Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Category: This is a bug.`#[feature(type_alias_impl_trait)]`Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Relevant to the compiler team, which will review and decide on the PR/issue.This issue requires a nightly compiler in some way.
Type
Projects
Status
Done