Closed
Description
Per #52632 (comment), the following is expected to work. Currently it does not find the defining use of Clonable
provided by the let
binding.
#![feature(existential_type)]
existential type Clonable: Clone;
fn main() {
let _x: Clonable = 0i32;
}
error[E0308]: mismatched types
--> src/main.rs:6:24
|
6 | let _x: Clonable = 0i32;
| ^^^^ expected anonymized type, found i32
|
= note: expected type `Clonable`
found type `i32`
error: could not find defining uses
--> src/main.rs:3:1
|
3 | existential type Clonable: Clone;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Mentioning the existential types tracking issue #34511
Mentioning @oli-obk and @cramertj
Metadata
Metadata
Assignees
Labels
No labels