Skip to content

Require that the RHS of a move be a local variable #591

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

Closed
msullivan opened this issue Jun 29, 2011 · 5 comments
Closed

Require that the RHS of a move be a local variable #591

msullivan opened this issue Jun 29, 2011 · 5 comments
Labels
A-type-system Area: Type system

Comments

@msullivan
Copy link
Contributor

This is a bit trickier than just making sure that it is a path of length 1, since it could also be an object field or (soon) an upvar.

@graydon
Copy link
Contributor

graydon commented Jun 29, 2011

well, an upvar is still an lval of length 1, and .. an obj field should not be de-initializable. I think you're ok still.

@msullivan
Copy link
Contributor Author

Right. We need to detect those and disallow them.

@marijnh
Copy link
Contributor

marijnh commented Jun 29, 2011

Please also see https://github.com/graydon/rust/issues/57 . Also, checking for a path of length one is not the way to go here. Just look up the def of an expr_path and verify that that is the right kind of def.

marijnh added a commit that referenced this issue Jul 7, 2011
@msullivan
Copy link
Contributor Author

Are you sure you meant #57? That doesn't seem related... We still allow moving from an object field, but otherwise get it right, I think?

@marijnh
Copy link
Contributor

marijnh commented Jul 12, 2011

No 57 wasn't what I meant. I meant a bug about moving out of temporaries, which I now can't find because github's bug search is somewhat primitive. I'm assigning this to add code to handle obj fields properly.

@ghost ghost assigned marijnh Jul 12, 2011
keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
Add experimental L4re support

This PR introduces a UNIX-alike target for the l4re microkernel
operating system. While this system is not a UNIX system at all, it is
easiest to use the POSIX interface and hence benefit from common
definitions.

This version is a very early draft, only the basic data types have been
verified and most of the complex data types (structs and unions) have
not been ported yet.

Thanks to TobiasSchaffner for providing his patched version, to verify some assumptions.
marysaka pushed a commit to sunriseos/rust that referenced this issue Oct 20, 2019
celinval added a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Conflicts:
    src/librustdoc/lib.rs: import conflict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-type-system Area: Type system
Projects
None yet
Development

No branches or pull requests

3 participants