Read a descriptor's variants without taking them
Build and test / Desktop (Linux) (push) Successful in 21m4s
Build and test / Layer separation (push) Successful in 27s
🐳 Android image / Build and push (push) Successful in 1s
Build and test / android-image (push) Successful in 2s
Traceability / Requirement traces (push) Successful in 24s
Build and test / Android (aarch64) (push) Failing after 33m42s
Build and test / Desktop (Linux) (push) Successful in 21m4s
Build and test / Layer separation (push) Successful in 27s
🐳 Android image / Build and push (push) Successful in 1s
Build and test / android-image (push) Successful in 2s
Traceability / Requirement traces (push) Successful in 24s
Build and test / Android (aarch64) (push) Failing after 33m42s
Two agents worked in parallel and neither could see this. The frame-budget
instrument matches `ParamKind::Enum { variants }` by value, which was free when
a descriptor was `&'static` and everything in it was borrowed for the life of
the program. Descriptors are owned now — a declaration parsed at run time
cannot hand out a `&'static` — so `variants` is a `Vec` and the arm was moving
out of a shared reference.
Bound by reference instead. The arm only ever reads the length.
The kind of conflict that survives a clean textual merge: git had nothing to
report, and the two changes are only incompatible once they are in the same
tree.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -634,7 +634,10 @@ fn activate_everything(graph: &mut EditGraph, neighbourhood: bool) {
|
|||||||
ParamKind::Bool => 1.0,
|
ParamKind::Bool => 1.0,
|
||||||
// The second variant when there is one. The first is the
|
// The second variant when there is one. The first is the
|
||||||
// default by construction — see `ParamDescriptor::choice`.
|
// default by construction — see `ParamDescriptor::choice`.
|
||||||
ParamKind::Enum { variants } => {
|
// Bound by reference: a descriptor's variants became an
|
||||||
|
// owned `Vec` when descriptors stopped being `&'static`,
|
||||||
|
// and this arm only ever reads the length.
|
||||||
|
ParamKind::Enum { ref variants } => {
|
||||||
if variants.len() > 1 {
|
if variants.len() > 1 {
|
||||||
1.0
|
1.0
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -282,7 +282,10 @@ fn full_point_chain() -> EditGraph {
|
|||||||
p.default + (far - p.default) * 0.25
|
p.default + (far - p.default) * 0.25
|
||||||
}
|
}
|
||||||
ParamKind::Bool => 1.0,
|
ParamKind::Bool => 1.0,
|
||||||
ParamKind::Enum { variants } => {
|
// Bound by reference: a descriptor's variants became an
|
||||||
|
// owned `Vec` when descriptors stopped being `&'static`,
|
||||||
|
// and this arm only ever reads the length.
|
||||||
|
ParamKind::Enum { ref variants } => {
|
||||||
if variants.len() > 1 {
|
if variants.len() > 1 {
|
||||||
1.0
|
1.0
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user