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

Type annotations required for trivial conversion #2

Open
yoanlcq opened this issue Jan 8, 2018 · 0 comments
Open

Type annotations required for trivial conversion #2

yoanlcq opened this issue Jan 8, 2018 · 0 comments

Comments

@yoanlcq
Copy link
Owner

yoanlcq commented Jan 8, 2018

This causes E283 :

let v = Vec2::<f32>::zero(); // Or whatever value, the point is to have a Vec2<f32>
let v = Vec3::from(v); // Fails to infer Vec3<f32>

Today, the solution would be...

let v = Vec2::<f32>::zero();
let v = Vec3::<f32>::from(v);

... but it's annoying. There's something that messes with the compiler's ability to properly infer types.
it might be just me though.

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

No branches or pull requests

1 participant