Skip to content

Implement TryFrom for frozen types#202

Open
matts1 wants to merge 2 commits into
facebook:mainfrom
matts1:push-lnzuspyqzzms
Open

Implement TryFrom for frozen types#202
matts1 wants to merge 2 commits into
facebook:mainfrom
matts1:push-lnzuspyqzzms

Conversation

@matts1

@matts1 matts1 commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

This allows you to write code such as:

struct Foo {
  value: ValueTyped<Foo>
}

// Before
let f = Foo{value: ValueTyped::<Foo>::new_err(value)?}

// After
let f = Foo{value: value.try_into()?}

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 13, 2026
@meta-codesync

meta-codesync Bot commented Jun 13, 2026

Copy link
Copy Markdown

This pull request has been imported. If you are a Meta employee, you can view this in D108527302. (Because this pull request was imported automatically, there will not be any future comments.)

@matts1 matts1 force-pushed the push-lnzuspyqzzms branch from 06e1424 to 35c1430 Compare June 13, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant