Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.6: support Deref<Target = T>; new-type pattern #26

Merged
merged 7 commits into from
Nov 17, 2022
Merged

0.6: support Deref<Target = T>; new-type pattern #26

merged 7 commits into from
Nov 17, 2022

Conversation

dhardy
Copy link
Contributor

@dhardy dhardy commented Nov 16, 2022

Closes #14. I think we don't actually need any new functionality?

@dhardy
Copy link
Contributor Author

dhardy commented Nov 16, 2022

This is broken: it simply dereferences the inner field. This fails wherever the inner field is private and not defined in the same module.

@dhardy dhardy closed this Nov 16, 2022
@dhardy
Copy link
Contributor Author

dhardy commented Nov 17, 2022

Via explicit target type Deref<Target = T> we can make this work.

This is a new feature and a (mildly) breaking change to ImplTrait and ImplArgs.

@dhardy dhardy reopened this Nov 17, 2022
@dhardy dhardy changed the title Test and doc new-type pattern 0.6: support Deref<Target = T>; new-type pattern Nov 17, 2022
@dhardy dhardy merged commit 545a11e into master Nov 17, 2022
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.

Auto Impl trait for struct Newtype(Arc<dyn Trait + Send + Sync + 'static>); etc.?
1 participant