Skip to content

feat: handle unsized types directly via reflection#2

Merged
aobatact merged 2 commits into
mainfrom
unsized
May 19, 2026
Merged

feat: handle unsized types directly via reflection#2
aobatact merged 2 commits into
mainfrom
unsized

Conversation

@aobatact

@aobatact aobatact commented May 19, 2026

Copy link
Copy Markdown
Owner

Reflect rust-lang/rust#156104 (try_as_dyn now accepts ?Sized) by adding ?Sized to the blanket Ser impl and routing unsized [T], str, &[T], &str through reflection instead of direct trait impls.

  • add TypeSer::{Slice, Str, SliceReference, StrReference} variants
  • adjust to nightly API change: Type.size field -> TypeId::size() method

aobatact and others added 2 commits May 18, 2026 03:59
Reflect rust-lang/rust#156104 (try_as_dyn now accepts ?Sized) by adding
?Sized to the blanket Ser impl and routing unsized [T], str, &[T], &str
through reflection instead of direct trait impls.

- enable min_specialization so OsStr/Path keep their string-conversion
  impls as specializations of the new ?Sized blanket
- add TypeSer::{Slice, Str, SliceReference, StrReference} variants
- adjust to nightly API change: Type.size field -> TypeId::size() method

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…dSerInner

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@aobatact
aobatact merged commit a30695e into main May 19, 2026
@aobatact
aobatact deleted the unsized branch May 19, 2026 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant