Repository navigation
A package's interface records what was inferred: a view's origins, a stored callable, a callable invoked once; an effect pin above a method is attached to it (#3401); a test for #898 - #3501
Merged
Conversation
added 8 commits
November 20, 2026 23:17
…s as a from clause
…rameter, a callable invoked once; package-interface-check compares source and interface (#3401)
… pin is printed for callable parameters only; a method case in the fixture
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.
Part of #3401 (package bundles, order of work step 1). Closes #898.
The rule (Eric, 2026-11-20): an importer reads the interface, never the body; the interface records what was inferred.
What the interface now prints, for a tree bundle, where the declaration left the fact to inference:
pub fn bigger(a: &Shape, b: &Shape) -> &Shape from a, b.@[effect]pin a person would write. Without it an importer accepted a closure holding a local by place where the source check refuses it.once. Without it an importer refused a consuming closure the source check accepts.A parser defect this exposed. An
@[effect]pin above a method in animplblock was never attached to the method: it stayed pending and landed on the next function declared outside the block. The compiler's own bundle failed its fingerprint check on five methods because of it. Fixed in the parser.The check. New lane
package-interface-check(a dependency oftests): the fixture packagetest/package_bundle/libleaves a return type, a view's origins, a stored callable and a single invocation to inference, in functions and in a method. Each of eight programs undertest/package_bundle/appstates its outcome on its first line and is checked against the package's source and against its interface alone; both must give that outcome, and the interface must reproduce the source's declaration fingerprint.Still to do in step 1 (recorded on #3401): generics carried as source,
pub-only output, the effect-disagreement warnings that are noise for a package, the bundle's wording for a twice-invoked callable, and suspension.#898.
type_needs_drop(*mut T)answered true in a specialization because the pointee's Drop impl was read as the pointer's; a later guard intype_has_drop_implfixed it.behav_898_pointer_field_in_specialization_owns_nothingpins it: one drop, no leak.Battery green;
:release-checksgreen, on the current main.