Skip to content

Pointer metadata (RFC 2580) is not supported #13992

@HKalbasi

Description

@HKalbasi
#![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

No one assigned

    Labels

    A-tytype system / type inference / traits / method resolutionC-featureCategory: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions