Skip to content

Code in E0139 explanation is not valid anymore #27946

Closed
@nagisa

Description

@nagisa
let result: SomeType = mem::uninitialized();
unsafe { copy_nonoverlapping(&v, &result) };
result // `v` transmuted to type `SomeType`

std::ptr::copy_nonoverlapping takes 3 arguments, but only 2 are provided. It also does not typecheck anymore either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions