Skip to content

(Useless) code that handles unsized values can be written #26474

Closed
@arielb1

Description

@arielb1
pub fn take_unsized(ref _v: [u8])  { }

pub trait ReturnUnsized {
    fn returns_unsized(&self) -> [u8];
}

pub fn create_unsized(v: &ReturnUnsized) {
    let ref _v = v.returns_unsized();
}

fn main() {}

I don't think this should compile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-DSTsArea: Dynamically-sized types (DSTs)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions