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

internal compiler error: type_of with ty_param #2504

Closed
killerswan opened this issue Jun 5, 2012 · 4 comments
Closed

internal compiler error: type_of with ty_param #2504

killerswan opened this issue Jun 5, 2012 · 4 comments
Assignees
Labels
A-codegen Area: Code generation
Milestone

Comments

@killerswan
Copy link
Contributor

So I was trying to add an insert_with_key method to map like so, and I don't yet know how to avoid this error.

On one of the branches where I'm playing with this, this is a commit before which things compile, and after which I see error like so. All that change does is change the argument type from fn(uint) to fn(V).

What's more, I haven't been able to reduce this to a problem outside of the standard library. For example, this compiles just fine. :P

Any ideas?

@killerswan
Copy link
Contributor Author

Note that at the moment, both @nikomatsakis and I think the no_non_implicitly_copyable_typarams warnings are not directly related to this issue.

@nikomatsakis
Copy link
Contributor

I think this is most likely a bug in monomorphization. That's precisely what I added the assert to detect. However, it might be a benign bug. It sounds to me like the fn(V) in the argument type of the interface is not being substituted.

@ghost ghost assigned nikomatsakis Jun 7, 2012
@catamorphism
Copy link
Contributor

@killerswan - is there any way you can try to reproduce this again? I'm not able to, as apparently the commits you linked to aren't in your repo anymore.

@killerswan
Copy link
Contributor Author

Hmm, shouldn't have been so tidy and cleaned out those old branches...

I was trying (and would still like) to add an insert_with_key ([as in Haskell](http://hackage.haskell.org/packages/archive/containers/0.4.0.0/doc/html/Data-Map.html#g:5 as in Haskell)) to the Map trait. It would be something like the following:

fn insert_with_key(ff: fn(K, V, V) -> V: , key: K, value: V) -> bool;

But then I was getting all those errors and could never compile it. Maybe this is possible now, and I should try again...

bors added a commit to rust-lang-ci/rust that referenced this issue Sep 22, 2022
…ule, r=RalfJung

move thread.rs into concurrency

Follow-up of rust-lang/miri#2500 and closes rust-lang/miri#2199

I moved the `thread.rs` into the `concurrency` module.
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation
Projects
None yet
Development

No branches or pull requests

3 participants