Repository navigation
Every engine facade's view accessor states from self; D22 cells for the D148 facades - #2573
Merged
Merged
Conversation
…der the view is refused The D148 facades (OrderedMap, OrderedSet, UnorderedMap, UnorderedSet, Deque, PriorityQueue, BinaryHeap, SortedList, Trie, HashIndex) return a view through the engine's slot pointer exactly as BTreeMap.get did before #2572: no inference roots it at `self`, so `let view = m.get(1).unwrap(); m.remove(1); print(*view)` compiled for every one of them (twelve probes, twelve accepted). Each accessor (`get`, `first`, `last`, `front`, `back`, `peek`) now declares `from self` under §21.1 rule 6, as BTreeMap.get does, and the D22 cells err_d22_<facade>_<accessor>_origin_after_mutation.w pin the rejection; a view used before the mutation still compiles.
Contributor
Author
|
Battery GREEN on e3e7f02 (seed nightly-20261020-local-3, 349 s wall; logs out/battery/ in the worktree). Gate green. |
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.
Every D148 engine facade's view accessor now states
from self(§21.1 rule 6), asBTreeMap.getdoes since #2572.The hole.
OrderedMap,OrderedSet,UnorderedMap,UnorderedSet,Deque,PriorityQueue,BinaryHeap,SortedList,TrieandHashIndexreturn views through the engine's slot pointer; no inference roots such a view atself, solet view = m.get(1).unwrap(); m.remove(1); print(*view)compiled for every one of them (twelve probes, twelve accepted on main).The fix. Each accessor (
get,first,last,front,back,peek) declaresfrom self; the clause mechanics landed in #2572 (the origin reaches callers through the signature; the judge accepts the clause for a body that reads through a raw pointer). Twelve D22 cellstest/compile_errors/err_d22_<facade>_<accessor>_origin_after_mutation.wpin the rejection; a view used before the mutation still compiles and runs.No compiler change; std only.