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

cast expressions not allowed in the patterns of an alt expression #1975

Closed
rmbishop opened this issue Mar 14, 2012 · 0 comments
Closed

cast expressions not allowed in the patterns of an alt expression #1975

rmbishop opened this issue Mar 14, 2012 · 0 comments

Comments

@rmbishop
Copy link

The following code

   let a:u32 = 1 as u32;
   alt a {
   1 as u32 {}
   other {}
   }

causes the following error

hello.rs:11:8: 11:11 error: unbound path u32
hello.rs:11    1 as u32 {}
marijnh added a commit that referenced this issue Mar 14, 2012
celinval added a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
We were incorrectly using the data pointer of the fat pointer to invoke the drop. Use the expression returned by the projection code instead.

Another issue was that we were incorrectly generating the wrong vtable function signature.
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

2 participants