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

Kind checker doesn't check that struct fields are copyable #3481

Closed
catamorphism opened this issue Sep 13, 2012 · 3 comments
Closed

Kind checker doesn't check that struct fields are copyable #3481

catamorphism opened this issue Sep 13, 2012 · 3 comments
Milestone

Comments

@catamorphism
Copy link
Contributor

kind::check_expr just doesn't have a case for structs, so you can write:

B { foo: x }

if x has type ~T and B is a struct with a ~T field foo.

This wasn't showing up before because last-use was enabled and most values involved in initializing a struct are going to be last uses.

I have a fix, testing it.

@ghost ghost assigned catamorphism Sep 13, 2012
@brson
Copy link
Contributor

brson commented Sep 13, 2012

Nice. I think I hit this today.

@catamorphism
Copy link
Contributor Author

This was painful to track down. I think it's the root cause of everything breaking when I disabled last-use, but I'm still waiting for the build to finish.

@nikomatsakis
Copy link
Contributor

Good catch.

@catamorphism catamorphism removed their assignment Jun 16, 2014
RalfJung pushed a commit to RalfJung/rust that referenced this issue Apr 20, 2024
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

3 participants