Skip to content

Change Record.is_unsafe_type to Record.safety_annotation#389

Merged
copybara-service[bot] merged 1 commit intomainfrom
test_864525668
Feb 3, 2026
Merged

Change Record.is_unsafe_type to Record.safety_annotation#389
copybara-service[bot] merged 1 commit intomainfrom
test_864525668

Conversation

@copybara-service
Copy link

Change Record.is_unsafe_type to Record.safety_annotation

The type is now SafetyAnnotation instead of a plain bool, making it possible
to distinguish between explicitly safe, explicitly unsafe, and unannotated. This
is a clearer interface, and also makes Record more similar to Function.

Updated the comment in ir.h to clarify that this field only describes the
annotation; Crubit may still mark an unannotated type as unsafe.

The record_safety function has been updated to respect the
SafetyAnnotation::DisableUnsafe annotation.

@google-cla
Copy link

google-cla bot commented Feb 2, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@copybara-service copybara-service bot force-pushed the test_864525668 branch 2 times, most recently from ce4e844 to d62a2d1 Compare February 3, 2026 22:31
The type is now `SafetyAnnotation` instead of a plain bool, making it possible
to distinguish between explicitly safe, explicitly unsafe, and unannotated. This
is a clearer interface, and also makes `Record` more similar to `Function`.

Updated the comment in `ir.h` to clarify that this field only describes the
annotation; Crubit may still mark an unannotated type as unsafe.

The `record_safety` function has been updated to respect the
`SafetyAnnotation::DisableUnsafe` annotation.

PiperOrigin-RevId: 865049355
@copybara-service copybara-service bot merged commit 37c4248 into main Feb 3, 2026
@copybara-service copybara-service bot deleted the test_864525668 branch February 3, 2026 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants