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

ICE when passing large fixed-size array as T:Clone via T:Copy #25733

Closed
pnkfelix opened this issue May 23, 2015 · 2 comments
Closed

ICE when passing large fixed-size array as T:Clone via T:Copy #25733

pnkfelix opened this issue May 23, 2015 · 2 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@pnkfelix
Copy link
Member

Spawned off of #24000

fn main() {
    let x = [5; 100];
    foo(x);
}

fn foo<X: Copy>(x: X) { let _ = bar(x); }

fn bar<X:Clone>(x: X) { let _ = x.clone(); }

causes this ICE:

<anon>:8:33: 8:42 error: internal compiler error: Encountered error `Unimplemented` selecting `Binder(core::clone::Clone)` during trans
<anon>:8 fn bar<X:Clone>(x: X) { let _ = x.clone(); }
                                         ^~~~~~~~~
note: the compiler unexpectedly panicked. this is a bug.
@steveklabnik
Copy link
Member

Triage: still ICEs

@steveklabnik
Copy link
Member

Looks like this is fixed:

C:\Users\steve\tmp> rustc +nightly foo.rs
C:\Users\steve\tmp> rustc --version
rustc 1.21.0-nightly (469a6f9bd 2017-08-22)

steveklabnik added a commit to rust-lang/glacier that referenced this issue Aug 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

3 participants