cairo
cairo copied to clipboard
Span as owning type
This stack of pull requests is managed by Graphite. Learn more about stacking.
Join @spapinistarkware and the rest of your teammates on Graphite
does it make sense to call it span if it is an owning type?
corelib/src/lib.cairo
line 340 at r2 (raw file):
use zeroable::NonZero; // #[cfg(test)]
revert
Code quote:
// #[cfg(test)]
crates/cairo-lang-lowering/src/test_data/match
line 72 at r2 (raw file):
//! > semantic_diagnostics error: Identifier not found. --> lib.cairo:1:12
please fix test.
Code quote:
error: Identifier not found.
--> lib.cairo:1:12
use array::array_get;
^*******^
crates/cairo-lang-sierra/src/extensions/modules/span.rs
line 112 at r3 (raw file):
}], ap_change: SierraApChange::Known { new_vars_only: false }, },
Consider not returning the span if it is empty.
Code quote:
BranchSignature {
vars: vec![OutputVarInfo {
ty: span_ty,
ref_info: OutputVarReferenceInfo::SameAsParam { param_idx: 0 },
}],
ap_change: SierraApChange::Known { new_vars_only: false },
},
crates/cairo-lang-starknet/src/plugin/entry_point.rs
line 160 at r3 (raw file):
Ok(RewriteNode::interpolate_patched( format!( "fn $function_name$(mut data: Span::<@felt252>) -> Span::<@felt252> {{
why snapshot?
Code quote:
@felt252
crates/cairo-lang-starknet/src/plugin/utils.rs
line 36 at r3 (raw file):
} /// Returns true if type_ast is `Span::<@felt252>`.
why snapshot?
Code quote:
@felt252