Skip to content

size_of_val and min_align_of_val intrinsics should be unsafe #80668

Closed
@tmiasko

Description

@tmiasko

The unsafe functions size_of_val_raw & align_of_val_raw are implemented using
size_of_val and min_align_of_val intrinsics, which are currently considered to
be safe.

The #69079 changed the API of those intrinsics to accept raw pointers instead
of references, but didn't update the safety of those intrinsics (the discussion
regarding safety can be found in aforementioned PR).

Function describing safety of intrinsics that needs to be updated (this will
also need to be accompanied by changes in the standard library):

| sym::size_of_val
| sym::min_align_of_val

Metadata

Metadata

Assignees

Labels

A-intrinsicsArea: IntrinsicsE-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