Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
1a88030
test: strengthen packed derive expansion coverage
jcfangc Sep 5, 2026
b8d3ed7
test: cover packed repr validation semantics
jcfangc Sep 5, 2026
3216322
test: exercise packed bit metadata parsing
jcfangc Sep 5, 2026
1fe8a18
test: verify packed derive crate resolution
jcfangc Sep 5, 2026
4c97c70
fix: parse packed repr metadata completely
jcfangc Sep 5, 2026
225ea68
test: cover packed macro repr policy
jcfangc Sep 5, 2026
9b77c14
test: cover packed width invariant
jcfangc Sep 5, 2026
608c5d0
test: cover packed code masks
jcfangc Sep 5, 2026
27f3702
test: cover packed view cloning
jcfangc Sep 5, 2026
095d29d
test: verify packed view representation
jcfangc Sep 5, 2026
e5b9fe4
test: cover packed view character lengths
jcfangc Sep 5, 2026
55e2c30
test: cover packed view emptiness
jcfangc Sep 5, 2026
debc475
test: cover packed view access
jcfangc Sep 5, 2026
28ec4c2
test: cover packed view first access
jcfangc Sep 5, 2026
1af518d
test: cover packed view last access
jcfangc Sep 5, 2026
6a30a67
test: cover packed view materialization
jcfangc Sep 5, 2026
caa1369
test: cover trusted packed view construction
jcfangc Sep 5, 2026
1a23b7d
test: cover packed owner views
jcfangc Sep 5, 2026
54e143f
test: cover packed view equality
jcfangc Sep 5, 2026
40de8f0
test: organize packed integration coverage
jcfangc Sep 5, 2026
d136c31
test: cover packed view iteration
jcfangc Sep 5, 2026
5382d18
test: verify packed iterator state
jcfangc Sep 5, 2026
07ff271
test: cover packed iterator next
jcfangc Sep 5, 2026
cd10b42
test: verify packed iterator size hints
jcfangc Sep 5, 2026
210c5fc
test: cover packed iterator next back
jcfangc Sep 5, 2026
40d7139
test: cover packed borrowed iteration
jcfangc Sep 5, 2026
eb08cd2
test: cover packed character matching
jcfangc Sep 5, 2026
378c3a3
test: cover packed prefix matching
jcfangc Sep 5, 2026
6a9f70a
test: cover packed suffix matching
jcfangc Sep 5, 2026
35be1df
test: cover packed containment
jcfangc Sep 5, 2026
205e5eb
test: cover packed find
jcfangc Sep 5, 2026
9fb6521
test: cover packed reverse find
jcfangc Sep 5, 2026
5e70e6a
test: cover packed prefix stripping
jcfangc Sep 5, 2026
2a673bc
test: cover packed suffix stripping
jcfangc Sep 5, 2026
9631781
test: organize bit adversarial coverage
jcfangc Sep 5, 2026
2c83fb1
test: cover packed code ordering
jcfangc Sep 5, 2026
ad864bb
test: cover packed partial ordering
jcfangc Sep 5, 2026
140fac0
test: cover packed ord comparison
jcfangc Sep 5, 2026
6ac8a97
test: cover packed view slicing
jcfangc Sep 5, 2026
5fc98ba
test: cover packed suffix views
jcfangc Sep 5, 2026
290d3f5
test: cover packed prefix views
jcfangc Sep 5, 2026
015e35f
test: cover packed string cloning
jcfangc Sep 5, 2026
8295af6
test: cover packed string invariants
jcfangc Sep 5, 2026
dd7a0ac
test: cover packed code writes
jcfangc Sep 5, 2026
2bdba26
test: cover packed owner emptiness
jcfangc Sep 5, 2026
3c35b2b
test: cover packed bits per char
jcfangc Sep 5, 2026
5153950
test: cover packed bits accessor
jcfangc Sep 5, 2026
1b74b31
test: cover packed clear
jcfangc Sep 5, 2026
b2bfefd
test: cover packed code extraction
jcfangc Sep 5, 2026
fa83619
test: cover packed default construction
jcfangc Sep 5, 2026
4f1bbc4
test: cover packed borrowed extension
jcfangc Sep 5, 2026
16aa094
test: cover packed owned extension
jcfangc Sep 5, 2026
e870d28
test: cover packed first accessor
jcfangc Sep 5, 2026
77d54b4
test: cover packed array construction
jcfangc Sep 5, 2026
6bf68ee
test: cover packed raw bit validation
jcfangc Sep 5, 2026
c0f4db0
test: cover packed char construction
jcfangc Sep 5, 2026
1f126e9
test: cover packed iterator construction
jcfangc Sep 5, 2026
9d2fecb
test: cover packed trusted construction
jcfangc Sep 5, 2026
f9b39b1
test: cover packed get accessor
jcfangc Sep 5, 2026
a916a81
test: cover packed bits conversion
jcfangc Sep 5, 2026
5c5fa50
test: cover packed last accessor
jcfangc Sep 5, 2026
958b4dc
test: cover packed new construction
jcfangc Sep 5, 2026
20b466f
test: cover packed pop
jcfangc Sep 5, 2026
3ad47fb
test: cover packed push
jcfangc Sep 5, 2026
aed8165
test: cover packed repetition
jcfangc Sep 5, 2026
02e3fc6
test: cover packed string concatenation
jcfangc Sep 5, 2026
025b063
test: cover packed remove
jcfangc Sep 5, 2026
e6f3bc5
test: cover packed replacement
jcfangc Sep 5, 2026
54e4bab
test: cover packed replacement assignment
jcfangc Sep 5, 2026
f1c6688
test: cover packed interval replacement
jcfangc Sep 5, 2026
4c5b3d8
test: fix trusted debug coverage and rename packed suite
jcfangc Sep 5, 2026
3f42954
test: cover packed retain
jcfangc Sep 5, 2026
3730439
test: cover packed reverse
jcfangc Sep 5, 2026
20f0f44
test: cover packed reverse assign
jcfangc Sep 5, 2026
d8e9113
test: cover packed truncate
jcfangc Sep 5, 2026
2f538bb
test: cover packed insert
jcfangc Sep 5, 2026
8be76e7
test: cover packed string insertion
jcfangc Sep 5, 2026
4b00733
test: cover packed split off
jcfangc Sep 5, 2026
45e1887
test: cover packed drain interval
jcfangc Sep 5, 2026
c1829f6
test: cover packed drain interval assign
jcfangc Sep 5, 2026
19a2dc2
test: cover packed interval replacement assign
jcfangc Sep 5, 2026
4e6f164
test: cover packed slice construction
jcfangc Sep 5, 2026
2ee56eb
test: cover packed owner iteration
jcfangc Sep 5, 2026
54d42ee
test: cover packed string hashing
jcfangc Sep 5, 2026
a067b4b
test: cover packed owner matching
jcfangc Sep 5, 2026
da49def
test: cover packed owner starts with
jcfangc Sep 5, 2026
7baf917
test: cover packed owner ends with
jcfangc Sep 5, 2026
f13d61e
test: cover packed owner contains
jcfangc Sep 5, 2026
3679a4d
test: cover packed owner find
jcfangc Sep 5, 2026
bc9dcd8
test: cover packed owner rfind
jcfangc Sep 5, 2026
53bbf39
test: cover packed owner strip prefix
jcfangc Sep 5, 2026
b97c583
test: cover packed owner strip suffix
jcfangc Sep 5, 2026
5152094
test: cover packed owner slice
jcfangc Sep 5, 2026
7b1ea9e
test: cover packed owner slice from
jcfangc Sep 5, 2026
d71aa98
test: cover packed owner slice until
jcfangc Sep 5, 2026
3384264
test: verify packed view materialization ownership
jcfangc Sep 5, 2026
3c689b7
refactor: split packed editing tests
jcfangc Sep 5, 2026
17ac622
refactor: split packed matching tests
jcfangc Sep 5, 2026
71e237f
refactor: organize packed tests by semantics
jcfangc Sep 5, 2026
90cf308
refactor: organize packed construction tests
jcfangc Sep 5, 2026
7b6be86
refactor: organize packed access tests
jcfangc Sep 5, 2026
c48e892
test: separate packed access and ordering concerns
jcfangc Sep 6, 2026
aaa188a
test: restore packed ordering oracle
jcfangc Sep 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ proc-macro-crate = "3.3.0"
proc-macro2 = "1.0"
quote = "1.0"
syn = "2.0"

[dev-dependencies]
proc-macro2 = { version = "1.0", features = ["span-locations"] }
14 changes: 9 additions & 5 deletions derive/src/funcs_for_expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ use std::collections::BTreeMap;
use proc_macro_crate::{FoundCrate, crate_name};
use proc_macro2::{Span, TokenStream as TokenStream2};
use quote::quote;
use syn::{Data, DeriveInput, Error, Expr, Fields, Lit, LitInt, Result};
use syn::{
Data, DeriveInput, Error, Expr, Fields, Lit, LitInt, Meta, Result, Token,
punctuated::Punctuated,
};

pub(super) fn expand(input: DeriveInput) -> Result<TokenStream2> {
require_repr_u8(&input)?;
Expand Down Expand Up @@ -95,10 +98,11 @@ fn require_repr_u8(input: &DeriveInput) -> Result<()> {
let mut found = false;
for attribute in &input.attrs {
if attribute.path().is_ident("repr") {
attribute.parse_nested_meta(|meta| {
found |= meta.path.is_ident("u8");
Ok(())
})?;
let repr =
attribute.parse_args_with(Punctuated::<Meta, Token![,]>::parse_terminated)?;
found |= repr
.iter()
.any(|meta| matches!(meta, Meta::Path(path) if path.is_ident("u8")));
}
}
if found {
Expand Down
Loading
Loading