-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
A-tytype system / type inference / traits / method resolutiontype system / type inference / traits / method resolutionC-featureCategory: feature requestCategory: feature request
Description
#![feature(ptr_metadata)]
use core::ptr::Pointee;
fn main() {
let x: <[&str] as Pointee>::Metadata = todo!();
let mut y = x;
y = 2;
}
Rustc accepts the above code but r-a reports a type mismatch between <[&str] as Pointee>::Metadata
and i32
. It is probably due magic implementation of Pointee
trait for types.
Metadata
Metadata
Assignees
Labels
A-tytype system / type inference / traits / method resolutiontype system / type inference / traits / method resolutionC-featureCategory: feature requestCategory: feature request