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

Applying --pretty typed to fixed-size vector-types fails. #7754

Closed
auroranockert opened this issue Jul 12, 2013 · 5 comments
Closed

Applying --pretty typed to fixed-size vector-types fails. #7754

auroranockert opened this issue Jul 12, 2013 · 5 comments
Labels
A-pretty Area: Pretty printing (including `-Z unpretty`) I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@auroranockert
Copy link
Contributor

Running rustc --lib --pretty typed on the following code

fn as_float4(a:[f32, ..4]) -> [f32, ..4] {
    a
}

fails with the following error.

error: internal compiler error: node_id_to_type: no type for node `unknown node (id=43)`
@sanxiyn
Copy link
Member

sanxiyn commented Sep 16, 2013

Still reproduces.

@chris-morgan
Copy link
Member

I just encountered this too, firstly with code that was using assert!. This strikes me as something severe enough that we should be fairly immediately either fixing --pretty typed or removing it. As it is, it won't work on any non-trivial codebase, because the new formatting employs fixed-size vectors—and pretty much everyone will use at least one of println!, fmt!, assert!, &c.

@chris-morgan
Copy link
Member

To be clear, it's writing it as a type that fails, not as a value.

These commands fail:

echo 'fn main() { assert!(true); }' | rustc - --pretty typed
echo 'fn main() { let _: [(), ..1] = [()]; }' | rustc - --pretty typed

While in the case of the second, removing the : [(), ..1] allows it to succeed.

@erickt
Copy link
Contributor

erickt commented May 11, 2014

Still reproduces.

@lilyball
Copy link
Contributor

This is a dupe of #4264.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-pretty Area: Pretty printing (including `-Z unpretty`) I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

6 participants