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

Examples of coercions are wrong #734

Closed
martin-t opened this issue Dec 30, 2019 · 1 comment · Fixed by #843
Closed

Examples of coercions are wrong #734

martin-t opened this issue Dec 30, 2019 · 1 comment · Fixed by #843

Comments

@martin-t
Copy link

martin-t commented Dec 30, 2019

Several of the examples on the coercions page claim that 42 gets coerced into i8. However, no conversion takes place, the 42 is i8 already thanks to type inference.

Potentially related PR: #342

@thepowersgang
Copy link

A more suitable type pair would be &String and &str (which is a deref coercion), or &Foo and &dyn TraitFooImpls

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 a pull request may close this issue.

2 participants