Repository navigation
Retained variadic case may name a pointer-wrapping facade resource &R (D240) - #3638
Merged
Merged
Conversation
Contributor
Author
|
Battery GREEN and
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #3120 (D240, delegated under D237/D98 from D235's ruling; spec v7.96).
src/Sema.with,src/SemaFacade.with):facade_resolve_variadic_slotaccepts&RwhenRis a facade resource wrapping a pointer (refusing non-pointer resources and rejectinglength paramwith&R); recordsFacadeRetainedForm.Resourceand indexes presentedpreservesparameter masks infacade_preserved_params.src/compiler/FacadeRender.with): retained pointer cases naming a facade resource passvalue.repr.src/MirForeignPairs.with): tracks retained facade resource origins (origin_is_resource), expires them on drop/move even when the origin is itself a resource, refuses non-preservesoperations on a retained resource while any handle holds it (while allowing two handles to share one resource and allowingpreservesops), and replaces numberedPAIRS_SITE_*constants withenum PairsSiteKind.docs/spec/016_ffi.md§16.2b.5,docs/spec/README.md(v7.96),docs/meetings/2026-11-26-D240-retained-variadic-resource-borrow.md,docs/meetings/README.md.test/behavior/behav_3120_retained_resource_borrow.with(real C fixture coveringHeaderList+Mime, sharing across twoEasyhandles,preservesops while held, non-preservesops afteruntil/reset/drop, zero leaks) + 4 compile-error tests (err_3120_retained_resource_{dropped_early,non_preserving_op,moved_while_held,non_pointer}.with).closes #3120