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

Print the offending mod-bounds on mismatch for unsafe crossing #3661

Merged

Conversation

glittershark
Copy link
Member

When a type is annotated with [@@unsafe_allow_any_mode_crossing], but the
mod-bounds on its jkind annotation are different than the mod-bounds on its
manifest, report the offending mod-bounds as part of the error message, rather
than just reporting that the mod-bounds are different. This is helpful when the
definition site of the manifest is far away.

When a type is annotated with `[@@unsafe_allow_any_mode_crossing]`, but the
mod-bounds on its jkind annotation are different than the mod-bounds on its
manifest, report the offending mod-bounds as part of the error message, rather
than just reporting that the mod-bounds are different. This is helpful when the
definition site of the manifest is far away.
@glittershark glittershark requested review from goldfirere and riaqn and removed request for goldfirere March 5, 2025 16:46
@glittershark glittershark enabled auto-merge (squash) March 5, 2025 16:54
@glittershark glittershark requested a review from riaqn March 5, 2025 18:32
@glittershark glittershark merged commit ca6cc8e into main Mar 6, 2025
22 checks passed
@glittershark glittershark deleted the aspsmith/improve-error-messages-for-unsafe-allow-any branch March 6, 2025 09:37
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.

2 participants