Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax some rules in unsafe context #6453

Merged
merged 2 commits into from
Sep 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions proposals/low-level-struct-improvements.md
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,12 @@ Namely the rules of [method invocation](#rules-method-invocation) updated above:

For a `new` expression with initializers, the initializer expressions count as arguments (they contribute their *safe-to-escape*) and the `ref` initializer expressions count as `ref` arguments (they contribute their *ref-safe-to-escape*), recursively.

## Changes in unsafe context

Pointer types are extended to allow managed types as referent type, but only in casts.
Such pointer types are written as a managed type followed by a `*` token. They produce a warning.
The address-of operator is relaxed to accept a variable with a managed type as its operand.

## Considerations
There are considerations other parts of the development stack should consider when evaluating this feature.

Expand Down