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

There is no way to create objects of intrinsically unsized types at compile time. #1446

Open
mahkoh opened this issue Jan 6, 2016 · 1 comment
Labels
T-lang Relevant to the language team, which will review and decide on the RFC.

Comments

@mahkoh
Copy link
Contributor

mahkoh commented Jan 6, 2016

For example:

struct CStr([u8]);
@mahkoh mahkoh changed the title There is no way to create intrinsically unsized types at compile time. There is no way to create objects of intrinsically unsized types at compile time. Jan 6, 2016
@oli-obk
Copy link
Contributor

oli-obk commented Jan 11, 2016

it could be possible to allow const-casting arrays to their unsized equivalents. We already have str as an unsized const value. Should be easy enough to add another one for slices.

You already reported an ICE trying to do this: rust-lang/rust#30355 So basically we'd just need to fix that bug.

@nrc nrc added the T-lang Relevant to the language team, which will review and decide on the RFC. label Aug 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-lang Relevant to the language team, which will review and decide on the RFC.
Projects
None yet
Development

No branches or pull requests

3 participants